mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
@@ -1,5 +1,10 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 23.2.1
|
||||
|
||||
* `Core`:
|
||||
* Fix of `year` field in `Birthdate`
|
||||
|
||||
## 23.2.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 8.3](https://core.telegram.org/bots/api-changelog#february-12-2025)**
|
||||
|
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=23.2.0
|
||||
library_version=23.2.1
|
||||
|
@@ -8307,17 +8307,18 @@ public abstract interface class dev/inmo/tgbotapi/types/BackgroundType$WithDocum
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/Birthdate {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/Birthdate$Companion;
|
||||
public fun <init> (III)V
|
||||
public fun <init> (IILjava/lang/Integer;)V
|
||||
public synthetic fun <init> (IILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()I
|
||||
public final fun component2 ()I
|
||||
public final fun component3 ()I
|
||||
public final fun copy (III)Ldev/inmo/tgbotapi/types/Birthdate;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/Birthdate;IIIILjava/lang/Object;)Ldev/inmo/tgbotapi/types/Birthdate;
|
||||
public final fun component3 ()Ljava/lang/Integer;
|
||||
public final fun copy (IILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/Birthdate;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/Birthdate;IILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/Birthdate;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getDate-1iQqF6g ()I
|
||||
public final fun getDay ()I
|
||||
public final fun getMonth ()I
|
||||
public final fun getYear ()I
|
||||
public final fun getYear ()Ljava/lang/Integer;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import korlibs.time.Date
|
||||
import korlibs.time.DateTime
|
||||
import korlibs.time.Year
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -11,9 +13,12 @@ data class Birthdate(
|
||||
@SerialName(monthField)
|
||||
val month: Int,
|
||||
@SerialName(yearField)
|
||||
val year: Int
|
||||
val year: Int? = null
|
||||
) {
|
||||
/**
|
||||
* Represents this birthday as korlibs [Date]. Will use this year in case if [year] has not been retrieved
|
||||
*/
|
||||
val date: Date by lazy {
|
||||
Date(year, month, day)
|
||||
Date(year ?: DateTime.now().year.year, month, day)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user