Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.misc
Class Calendar

    java.lang.Object
      com.knowgate.misc.Calendar

    public class Calendar

extends java.lang.Object

Calendar localization functions

Constructor Summary
`Calendar()`

Method Summary
`static java.util.Date` | `addMonths(int nMonths, java.util.Date dt)`
`static int` | `DaysBetween(java.util.Date dt1st, java.util.Date dt2nd)`
`static int` | `DaysBetween(java.util.GregorianCalendar dt1st, java.util.GregorianCalendar dt2nd)`
`static int` | `LastDay(int MyMonth, int MyYear)` Get Month Last Day
`static java.lang.String` | `MonthName(int MyMonth, java.lang.String sLangId)` Get translated month name
`static java.lang.String` | `WeekDayName(int MyWeekDay, java.lang.String sLangId)` Get translated week day name

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Calendar

    public Calendar()

Method Detail

### WeekDayName

    public static java.lang.String WeekDayName(int MyWeekDay,
                                               java.lang.String sLangId)

  Get translated week day name

  Parameters:
    `MyWeekDay` - [1=Sunday .. 7=Saturday]
    `sLangId` - 2 characters language identifier (currently only { "en","es","it","fr","de" and "pt" } are supported)
  Returns:
    Week day name

### MonthName

    public static java.lang.String MonthName(int MyMonth,
                                             java.lang.String sLangId)
                                      throws java.lang.IllegalArgumentException

  Get translated month name

  Parameters:
    `MyMonth` - [0=January .. 11=December]
    `sLangId` - sLangId 2 characters language identifier (currently only { "en","es","it","fr","de" and "pt" } are supported)
  Returns:
    Month Name
  Throws:
    `java.lang.IllegalArgumentException` - if sLangId is not one of {es, en, fr, it, de, pt}

### LastDay

    public static int LastDay(int MyMonth,
                              int MyYear)

  Get Month Last Day

  Parameters:
    `MyMonth` - [0=January .. 11=December]
    `MyYear` - 4 digits year
  Returns:
    the last day of the month. Takes into account leap years

### addMonths

    public static java.util.Date addMonths(int nMonths,
                                           java.util.Date dt)

### DaysBetween

    public static int DaysBetween(java.util.Date dt1st,
                                  java.util.Date dt2nd)

### DaysBetween

    public static int DaysBetween(java.util.GregorianCalendar dt1st,
                                  java.util.GregorianCalendar dt2nd)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD