-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.trickl.text.oanda; | ||
|
||
import java.time.Instant; | ||
import java.time.ZoneId; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
public class Rfc3339 { | ||
|
||
public static final String WITH_NANO_PRECISION = "yyyy-MM-dd'T'HH:mm:ss.nnnnnnnnnX"; | ||
public static final String WITH_MILLISECOND_PRECISION = "yyyy-MM-dd'T'HH:mm:ss.nnnX"; | ||
public static final String WITH_SECOND_PRECISION = "yyyy-MM-dd'T'HH:mm:ssX"; | ||
public static final DateTimeFormatter YMDHMSN_FORMATTER = | ||
DateTimeFormatter.ofPattern(WITH_NANO_PRECISION).withZone(ZoneId.of("UTC")); | ||
public static final DateTimeFormatter YMDHMS_FORMATTER = | ||
DateTimeFormatter.ofPattern(WITH_SECOND_PRECISION).withZone(ZoneId.of("UTC")); | ||
public static final Instant YEAR_OF_2264 = Instant.ofEpochMilli(9223368436000L); | ||
public static final DateTimeFormatter YMDHMSM_FORMATTER = | ||
DateTimeFormatter.ofPattern(WITH_MILLISECOND_PRECISION).withZone(ZoneId.of("UTC")); | ||
public static final Instant YEAR_OF_1970 = Instant.ofEpochMilli(1); | ||
|
||
private Rfc3339() {} | ||
} |