C# 클래스 iTextSharp.xmp.impl.Iso8601Converter

Converts between ISO 8601 Strings and Calendar with millisecond resolution. @since 16.02.2006
파일 보기 프로젝트 열기: nonorganic/dssnet 1 사용 예제들

공개 메소드들

메소드 설명
Parse ( string iso8601String ) : IXmpDateTime

Converts an ISO 8601 string to an XMPDateTime. Parse a date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:

  • YYYY
  • YYYY-MM
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD
Data fields:
  • YYYY = four-digit year
  • MM = two-digit month (01=January, etc.)
  • DD = two-digit day of month (01 through 31)
  • hh = two digits of hour (00 through 23)
  • mm = two digits of minute (00 through 59)
  • ss = two digits of second (00 through 59)
  • s = one or more digits representing a decimal fraction of a second
  • TZD = time zone designator (Z or +hh:mm or -hh:mm)
Note that ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow any year, even negative ones. The year is formatted as "%.4d".

Note: Tolerate missing TZD, assume is UTC. Photoshop 8 writes dates like this for exif:GPSTimeStamp.
Note: DOES NOT APPLY ANYMORE. Tolerate missing date portion, in case someone foolishly writes a time-only value that way.

Parse ( string iso8601String, IXmpDateTime binValue ) : IXmpDateTime
Render ( IXmpDateTime dateTime ) : string

Converts a Calendar into an ISO 8601 string. Format a date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:

  • YYYY
  • YYYY-MM
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD
Data fields:
  • YYYY = four-digit year
  • MM = two-digit month (01=January, etc.)
  • DD = two-digit day of month (01 through 31)
  • hh = two digits of hour (00 through 23)
  • mm = two digits of minute (00 through 59)
  • ss = two digits of second (00 through 59)
  • s = one or more digits representing a decimal fraction of a second
  • TZD = time zone designator (Z or +hh:mm or -hh:mm)

Note: ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow any year, even negative ones. The year is formatted as "%.4d".

Note: Fix for bug 1269463 (silently fix out of range values) included in parsing. The quasi-bogus "time only" values from Photoshop CS are not supported.

메소드 상세

Parse() 공개 정적인 메소드

Converts an ISO 8601 string to an XMPDateTime. Parse a date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:
  • YYYY
  • YYYY-MM
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD
Data fields:
  • YYYY = four-digit year
  • MM = two-digit month (01=January, etc.)
  • DD = two-digit day of month (01 through 31)
  • hh = two digits of hour (00 through 23)
  • mm = two digits of minute (00 through 59)
  • ss = two digits of second (00 through 59)
  • s = one or more digits representing a decimal fraction of a second
  • TZD = time zone designator (Z or +hh:mm or -hh:mm)
Note that ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow any year, even negative ones. The year is formatted as "%.4d".

Note: Tolerate missing TZD, assume is UTC. Photoshop 8 writes dates like this for exif:GPSTimeStamp.
Note: DOES NOT APPLY ANYMORE. Tolerate missing date portion, in case someone foolishly writes a time-only value that way.

Is thrown when the string is non-conform.
public static Parse ( string iso8601String ) : IXmpDateTime
iso8601String string a date string that is ISO 8601 conform.
리턴 IXmpDateTime

Parse() 공개 정적인 메소드

Is thrown when the string is non-conform.
public static Parse ( string iso8601String, IXmpDateTime binValue ) : IXmpDateTime
iso8601String string a date string that is ISO 8601 conform.
binValue IXmpDateTime an existing XMPDateTime to set with the parsed date
리턴 IXmpDateTime

Render() 공개 정적인 메소드

Converts a Calendar into an ISO 8601 string. Format a date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:
  • YYYY
  • YYYY-MM
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD
Data fields:
  • YYYY = four-digit year
  • MM = two-digit month (01=January, etc.)
  • DD = two-digit day of month (01 through 31)
  • hh = two digits of hour (00 through 23)
  • mm = two digits of minute (00 through 59)
  • ss = two digits of second (00 through 59)
  • s = one or more digits representing a decimal fraction of a second
  • TZD = time zone designator (Z or +hh:mm or -hh:mm)

Note: ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow any year, even negative ones. The year is formatted as "%.4d".

Note: Fix for bug 1269463 (silently fix out of range values) included in parsing. The quasi-bogus "time only" values from Photoshop CS are not supported.

public static Render ( IXmpDateTime dateTime ) : string
dateTime IXmpDateTime an XMPDateTime-object.
리턴 string