Package com.infinitekind.util
Class CustomDateFormat
java.lang.Object
com.infinitekind.util.CustomDateFormat
public class CustomDateFormat
extends java.lang.Object
Flexible date parser and formatter
-
Constructor Summary
Constructors Constructor Description CustomDateFormat(java.lang.String formatStr)
-
Method Summary
Modifier and Type Method Description static CustomDateFormat
dateFormatFromSystem()
java.lang.String
format(int date)
Format the given YYYYMMDD integer date as a stringjava.lang.String
format(int year, int month, int day)
java.lang.String
format(java.util.Calendar cal)
java.lang.String
format(java.util.Date date)
Format the given java.util.Date object as a stringjava.lang.String
getFieldOrderString()
Return a simple character string indicating the order of the m,d,y fields.java.lang.String
getPattern()
static int
guessCenturyForYear(int year)
static void
main(java.lang.String[] argv)
java.util.Date
parse(java.lang.String dateStr)
int
parseInt(java.lang.String dateStr)
void
setShowDay(boolean showDay)
void
setShowYear(boolean showYear)
-
Constructor Details
-
CustomDateFormat
public CustomDateFormat(java.lang.String formatStr)
-
-
Method Details
-
getFieldOrderString
public java.lang.String getFieldOrderString()Return a simple character string indicating the order of the m,d,y fields. This can be fed to the DateFieldOrder enum builder in com.infinitekind.moneydance.model.txtimport package, if available.- Since:
- Moneydance 2017.3 build 1605
-
setShowDay
public void setShowDay(boolean showDay) -
setShowYear
public void setShowYear(boolean showYear) -
getPattern
public java.lang.String getPattern() -
format
public final java.lang.String format(java.util.Date date)Format the given java.util.Date object as a string -
format
public final java.lang.String format(int date)Format the given YYYYMMDD integer date as a string -
format
public java.lang.String format(java.util.Calendar cal) -
format
public java.lang.String format(int year, int month, int day) -
parse
public java.util.Date parse(java.lang.String dateStr) -
parseInt
public int parseInt(java.lang.String dateStr) -
guessCenturyForYear
public static final int guessCenturyForYear(int year) -
dateFormatFromSystem
-
main
public static void main(java.lang.String[] argv)
-