edu.stanford.nlp.time
Class EnglishDateTimeUtils

java.lang.Object
  extended by edu.stanford.nlp.time.EnglishDateTimeUtils

public class EnglishDateTimeUtils
extends java.lang.Object

Some utility functions for date time (for English)

Author:
Angel Chang

Method Summary
protected static java.lang.String date2Week(java.lang.String iso)
           
protected static java.lang.String day2Iso(java.lang.String month, java.lang.String day)
           
protected static int day2Num(int month, java.lang.String day)
           
protected static java.lang.String month2Iso(java.lang.String month)
           
protected static int month2Num(java.lang.String month)
           
protected static int nthDOW2Date(int month, int dow, int nth, int year)
          Figures the nth DOW in month as a date for a given year.
protected static java.lang.String year2Iso(java.lang.String year)
          Takes a basic string representation of year and returns a normalized ISO representation
ISO 8601 prescribes a four digit year "YYYY".
protected static int year2Num(java.lang.String year)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

date2Week

protected static java.lang.String date2Week(java.lang.String iso)

nthDOW2Date

protected static int nthDOW2Date(int month,
                                 int dow,
                                 int nth,
                                 int year)
Figures the nth DOW in month as a date for a given year.


month2Iso

protected static java.lang.String month2Iso(java.lang.String month)

month2Num

protected static int month2Num(java.lang.String month)

day2Iso

protected static java.lang.String day2Iso(java.lang.String month,
                                          java.lang.String day)

day2Num

protected static int day2Num(int month,
                             java.lang.String day)

year2Num

protected static int year2Num(java.lang.String year)

year2Iso

protected static java.lang.String year2Iso(java.lang.String year)
Takes a basic string representation of year and returns a normalized ISO representation
ISO 8601 prescribes a four digit year "YYYY".
For years before 0000 or after 9999, it should always be prefixed by a "+" or "-"
Note that year 0000 represents the year 1BC (there is offset of one, year 3BC would be -0002)

Parameters:
year -


Stanford NLP Group