-
Notifications
You must be signed in to change notification settings - Fork 110
Added LocalTime.Formats.ISO_BASIC (ISO 8601 basic format) #518
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
Open
lucgirardin
wants to merge
10
commits into
Kotlin:master
Choose a base branch
from
lucgirardin:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c8e2757
Added LocalTime.Formats.ISO_BASIC (ISO 8601 basic format)
lucgirardin cca454f
Corrected LocalTime.Formats.ISO_BASIC with leading 'T'
lucgirardin 8d17ebb
Corrected LocalTime.Formats.ISO_BASIC with leading 'T'
lucgirardin 8cddb49
Format is case-insensitive
lucgirardin 76a093a
ISO_BASIC starts with T
lucgirardin bae2c6e
Merge branch 'Kotlin:master' into master
lucgirardin 8075aa0
Added ISO_BASIC to API
lucgirardin 8177fe6
Added tests for ISO_BASIC
lucgirardin a403817
a) is the basic format
lucgirardin deefb8d
Fractions of a second are only emitted together with the second value…
lucgirardin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,19 @@ public expect class LocalTime : Comparable<LocalTime> { | |
* [kotlinx.datetime.format.DateTimeFormat] for [LocalTime] values. | ||
*/ | ||
public object Formats { | ||
/** | ||
* ISO 8601 basic format. | ||
* | ||
* Examples: `T1234`, `T123456`, `T123456.789`, `T123456.1234`. | ||
* | ||
* When formatting, seconds are always included, even if they are zero. | ||
* Fractional parts of the second are included if non-zero. | ||
* | ||
* @see LocalDateTime.Formats.ISO_BASIC | ||
* @sample kotlinx.datetime.test.samples.LocalTimeSamples.Formats.isoBasic | ||
*/ | ||
public val ISO_BASIC: DateTimeFormat<LocalTime> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also add tests. Examples: |
||
|
||
/** | ||
* ISO 8601 extended format. | ||
* | ||
|
@@ -215,6 +228,7 @@ public expect class LocalTime : Comparable<LocalTime> { | |
* We *forbid* using the time designator `T` to allow for a predictable composition of formats: | ||
* see the note at the end of rule 5.3.5. | ||
* | ||
* @see LocalDateTime.Formats.ISO | ||
* @sample kotlinx.datetime.test.samples.LocalTimeSamples.Formats.iso | ||
*/ | ||
public val ISO: DateTimeFormat<LocalTime> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
LocalDateTime.ISO_BASIC
is also worth mentioning (given that you personally were interested inLocalDateTime.Formats.ISO_BASIC
, for example).