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

## toxi.util
Class DateUtils

    java.lang.Object
      toxi.util.DateUtils

    public class DateUtils

extends java.lang.Object

A Simple timestamp generator/formatter with timezone support.

Field Summary
`static java.text.SimpleDateFormat` | `FORMAT`
`static java.util.TimeZone` | `GMT`

Constructor Summary
`DateUtils()`

Method Summary
`static java.lang.String` | `timeStamp()` Creates a formatted timestamp string of the current datetime using the local host timezone.
`static java.lang.String` | `timeStamp(java.util.Date date)` Creates a formatted timestamp string of the given date using the local host timezone.
`static java.lang.String` | `timeStamp(java.util.Date date, java.util.TimeZone zone)` Creates a formatted timestamp string of the given date using the specified timezone.
`static java.lang.String` | `timeStamp(long t)` Creates a formatted timestamp string of the given epoch using the local host timezone.
`static java.lang.String` | `timeStampForZone(java.lang.String zoneID, java.util.Date date)` Creates a formatted timestamp string of the given date using the given timezone ID.
`static java.lang.String` | `timeStampGMT()` Creates a formatted timestamp string of the current date in GMT.
`static java.lang.String` | `timeStampGMT(java.util.Date date)` Creates a formatted timestamp string of the given date in GMT.
`static java.lang.String` | `timeStampGMT(long t)` Creates a formatted timestamp string of the given epoch in GMT.

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

Field Detail

### GMT

    public static final java.util.TimeZone GMT

### FORMAT

    public static final java.text.SimpleDateFormat FORMAT

Constructor Detail

### DateUtils

    public DateUtils()

Method Detail

### timeStamp

    public static final java.lang.String timeStamp()

  Creates a formatted timestamp string of the current datetime using the local host timezone.

  Returns:
    timestamp

### timeStamp

    public static final java.lang.String timeStamp(java.util.Date date)

  Creates a formatted timestamp string of the given date using the local host timezone.

  Parameters:
    `date` -
  Returns:
    timestamp

### timeStamp

    public static final java.lang.String timeStamp(java.util.Date date,
                                                   java.util.TimeZone zone)

  Creates a formatted timestamp string of the given date using the specified timezone.

  Parameters:
    `date` -
    `zone` -
  Returns:
    timestamp

### timeStamp

    public static final java.lang.String timeStamp(long t)

  Creates a formatted timestamp string of the given epoch using the local host timezone.

  Parameters:
    `t` - unix epoch timestamp
  Returns:
    timestamp

### timeStampForZone

    public static final java.lang.String timeStampForZone(java.lang.String zoneID,
                                                          java.util.Date date)

  Creates a formatted timestamp string of the given date using the given timezone ID.

  Parameters:
    `zoneID` -
    `date` -
  Returns:
    timestamp
  See Also:
    `TimeZone.getTimeZone(String)`

### timeStampGMT

    public static final java.lang.String timeStampGMT()

  Creates a formatted timestamp string of the current date in GMT.

  Returns:
    timestamp

### timeStampGMT

    public static final java.lang.String timeStampGMT(java.util.Date date)

  Creates a formatted timestamp string of the given date in GMT.

  Returns:
    timestamp

### timeStampGMT

    public static final java.lang.String timeStampGMT(long t)

  Creates a formatted timestamp string of the given epoch in GMT.

  Returns:
    timestamp

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