1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-11-25 00:36:15 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
d66d4b4209 jvmApiDump 2025-02-17 13:18:55 +06:00
9d54820fd7 fill changelog 2025-02-17 13:17:26 +06:00
1876df2c2d fix of year in Birthdate 2025-02-17 13:16:10 +06:00
d818592cd3 start 23.2.1 2025-02-17 13:14:03 +06:00
c29737b6b3 update changelog and readme 2025-02-15 20:53:28 +06:00
46243a21eb Merge pull request #949 from InsanusMokrassar/23.2.0
23.2.0
2025-02-15 14:28:08 +06:00
5 changed files with 22 additions and 9 deletions

View File

@@ -1,7 +1,14 @@
# 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)**
* `Version`:
* `MicroUtils`: `0.24.5` -> `0.24.6`
* `Ktor`: `3.0.3` -> `3.1.0`

View File

@@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-8.2-blue)](https://core.telegram.org/bots/api-changelog#january-1-2025)
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-8.3-blue)](https://core.telegram.org/bots/api-changelog#february-12-2025)
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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)
}
}