Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for encoding Duration in HOCON format #2080

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

alexmihailov
Copy link
Contributor

Add support for encoding kotlin.time.Duration in HOCON format using time unit short names: d, h, m, s, ms, us, ns. Encoding use the largest time unit. Example:

  • 120 seconds -> 2 m
  • 121 seconds -> 121 s
  • 120 minutes -> 2 h
  • 122 minutes -> 122 m
  • 24 hours -> 1 d

Ducumentation

Copy link
Member

@sandwwraith sandwwraith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sandwwraith sandwwraith merged commit 52218e8 into Kotlin:dev Nov 10, 2022
fred01 pushed a commit to fred01/kotlinx.serialization that referenced this pull request Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants