public class DateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
convertDate(int original,
boolean fromProleptic,
boolean toProleptic) |
static int |
convertDateToHybrid(int proleptic)
Convert an epoch day from the proleptic Gregorian calendar to the hybrid
Julian/Gregorian.
|
static int |
convertDateToProleptic(int hybrid)
Convert an epoch day from the hybrid Julian/Gregorian calendar to the
proleptic Gregorian.
|
static long |
convertTime(long original,
boolean fromProleptic,
boolean toProleptic,
boolean useUtc) |
static long |
convertTimeToHybrid(long proleptic,
boolean useUtc)
Convert epoch millis from the proleptic Gregorian calendar to the hybrid
Julian/Gregorian.
|
static long |
convertTimeToProleptic(long hybrid,
boolean useUtc)
Convert epoch millis from the hybrid Julian/Gregorian calendar to the
proleptic Gregorian.
|
static DateTimeFormatter |
getTimeFormat(boolean useProleptic,
boolean useUtc) |
static Integer |
parseDate(String date,
boolean fromProleptic) |
static Long |
parseTime(String date,
boolean fromProleptic,
boolean useUtc) |
static String |
printDate(int date,
boolean fromProleptic) |
static String |
printTime(long millis,
boolean fromProleptic,
boolean useUtc) |
public static int convertDateToProleptic(int hybrid)
hybrid
- day of epoch in the hybrid Julian/Gregorianpublic static int convertDateToHybrid(int proleptic)
proleptic
- day of epoch in the proleptic Gregorianpublic static long convertTimeToProleptic(long hybrid, boolean useUtc)
hybrid
- millis of epoch in the hybrid Julian/GregorianuseUtc
- use UTC instead of localpublic static long convertTimeToHybrid(long proleptic, boolean useUtc)
proleptic
- millis of epoch in the proleptic GregorianuseUtc
- use UTC instead of localpublic static int convertDate(int original, boolean fromProleptic, boolean toProleptic)
public static long convertTime(long original, boolean fromProleptic, boolean toProleptic, boolean useUtc)
public static String printDate(int date, boolean fromProleptic)
public static DateTimeFormatter getTimeFormat(boolean useProleptic, boolean useUtc)
public static String printTime(long millis, boolean fromProleptic, boolean useUtc)
Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.