Class ISODate


  • public final class ISODate
    extends LcDate
    The ISODate class derives from LcDate to define ISO8601/XFA date patterns.

    Valid ISO8601/XFA date strings are in any one of the following date patterns:

    • YYYY[-MM[-DD]]
    • YYYY[MM[DD]]
    where [...] denotes optional elements. See LcDate for the meaning of the various metasymbols used above. Here's a snippet of code illustrating the use of ISODate to reformat an ISO8601/XFA date string
    
          import com.adobe.xfa.ut.ISODate;
          import com.adobe.xfa.ut.LcDate;
          ...
          ISODate d = new ISODate("2000-02-28", "");
          String s = "Unknown";
          if (d.isValid())
              s = d.format(LcDate.XFA_TIME_FMT1);
          System.out.println(s);
     
    • Constructor Detail

      • ISODate

        public ISODate()
        Instantiate an ISODate object from today's date.
      • ISODate

        public ISODate​(int days)
        Instantiate an ISODate object from the given number of days from the epoch. The epoch is such that day 1 corresponds to Jan 1, 1900.
        Parameters:
        days - the number of days from epoch.
      • ISODate

        public ISODate​(java.lang.String date,
                       java.lang.String locale)
        Instantiate a ISODate object from the given date string.
        Parameters:
        date - an ISO8601/XFA date string.
        locale - a locale string. When empty, it will default to the current locale.
      • ISODate

        public ISODate​(java.lang.String locale,
                       int centurySplit)
        Instantiate a ISODate object from today's date given a locale string and a possible century split year.
        Parameters:
        locale - a locale string. When empty, it will default to the current locale.
        centurySplit - a century split year.