public class GregorianCalendarLocalisation extends Object
Calendar localisation functions
Modifier and Type | Field and Description |
---|---|
static int |
FRIDAY |
static int |
MONDAY |
static int |
SATURDAY |
static int |
SUNDAY |
static int |
THURSDAY |
static int |
TUESDAY |
static int |
WEDNESDAY |
Constructor and Description |
---|
GregorianCalendarLocalisation() |
Modifier and Type | Method and Description |
---|---|
static Date |
addMonths(int nMonths,
Date dt) |
static int |
DaysBetween(Date dt1st,
Date dt2nd) |
static int |
DaysBetween(GregorianCalendar dt1st,
GregorianCalendar dt2nd) |
static boolean |
isDate(String dtexpr,
String dtformat)
Verify that a string represents a valid date
|
static int |
LastDay(int MyMonth,
int MyYear)
Get Month Last Day
|
static Date[] |
LastMonth() |
static Date[] |
LastWeek(int iFirstDayOfWeek) |
static String |
MonthName(int MyMonth,
String sLangId)
Get translated month name
|
static Date[] |
ThisMonth() |
static Date[] |
ThisWeek(int iFirstDayOfWeek) |
static String |
WeekDayName(int MyWeekDay,
String sLangId)
Get translated week day name
|
public static final int SUNDAY
public static final int MONDAY
public static final int TUESDAY
public static final int WEDNESDAY
public static final int THURSDAY
public static final int FRIDAY
public static final int SATURDAY
public static String WeekDayName(int MyWeekDay, String sLangId)
MyWeekDay
- [1=Sunday .. 7=Saturday]sLangId
- 2 characters language identifier (currently only { "en","es","it","fr","de" and "pt" } are supported)public static String MonthName(int MyMonth, String sLangId) throws IllegalArgumentException
MyMonth
- [0=January .. 11=December]sLangId
- sLangId 2 characters language identifier (currently only { "en","es","it","fr","de" and "pt" } are supported)IllegalArgumentException
- if sLangId is not one of {es, en, fr, it, de, pt}public static int LastDay(int MyMonth, int MyYear)
MyMonth
- [0=January .. 11=December]MyYear
- 4 digits yearpublic static int DaysBetween(GregorianCalendar dt1st, GregorianCalendar dt2nd)
public static Date[] ThisWeek(int iFirstDayOfWeek) throws IllegalArgumentException
IllegalArgumentException
public static Date[] LastWeek(int iFirstDayOfWeek) throws IllegalArgumentException
IllegalArgumentException
public static Date[] ThisMonth()
public static Date[] LastMonth()
public static boolean isDate(String dtexpr, String dtformat)
dtexpr
- Stringdtformat
- String Date format.
"d" for dates with format "yyyy-MM-dd"
"s" for dates with format "dd/MM/yyyy"
"ts" for dates with format "yyyy-MM-dd HH:mm:ss"Copyright © 2001–2019 KnowGate. All rights reserved.