com.starteam.util
Class ISO8601

java.lang.Object
  extended by com.starteam.util.ISO8601

public final class ISO8601
extends java.lang.Object

A utility class for encoding and parsing ISO8601 date/time format strings. The following sites have more information:

W3C NOTE - Date and Time Formated

Appendix 2 of the WebDAV specification.

Discussion by Markus Kuhn


Method Summary
static long parse(java.lang.String spec)
          Parses the provided IS08601 formated string abd returns the corresponding Java time.
static java.lang.String toGMTString(long time)
          Returns the ISO8601 date/time format for the specified time.
static java.lang.String toLocalString(long time)
          Returns the ISO8601 date/time string for the specified Java time with respect to the local timezone.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toGMTString

public static java.lang.String toGMTString(long time)
Returns the ISO8601 date/time format for the specified time. E.g: "1999-06-17T16:43:07.982Z"

Parameters:
time - the Java time value to represent as a String
Returns:
the IS08601 time format for the specified time

toLocalString

public static java.lang.String toLocalString(long time)
Returns the ISO8601 date/time string for the specified Java time with respect to the local timezone.

Parameters:
time - Java time value to represent as a string
Returns:
the IS08601 time format for the specified time

parse

public static long parse(java.lang.String spec)
Parses the provided IS08601 formated string abd returns the corresponding Java time. Some example formats:

Parameters:
spec - the IS08601 date/time specification string
Returns:
the Java time value represented by the specified format string


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.