Package | com.adobe.xmp |
Class | public class XMPDateTime |
Date
object.
Property | Defined by | ||
---|---|---|---|
day : int
Retrieves the day-of-month value from a date-time.
| XMPDateTime | ||
hour : int
Retrieves the hour value from a date-time.
| XMPDateTime | ||
milliSecond : int
Retrieves the milliseconds value for a time value.
| XMPDateTime | ||
minute : int
Retrieves the minute value from a date-time.
| XMPDateTime | ||
month : int
Retrieves the month value from a date-time.
| XMPDateTime | ||
second : int
Retrieves the second value from a date-time.
| XMPDateTime | ||
timezoneHour : int [read-only]
Retrieves the hours portion of the time-zone offset.
| XMPDateTime | ||
timezoneMinute : int [read-only]
Retrieves the minutes portion of the time-zone offset.
| XMPDateTime | ||
timezoneOffset : int
Retrieves the time-zone offset from a date-time, in minutes.
| XMPDateTime | ||
year : int Retrieves the year value from a date-time.
| XMPDateTime |
Method | Defined by | ||
---|---|---|---|
convertDateToISO8601(date:Date, ignoreTZ:Boolean = false):String
[static] Converts a
XMPDateTime object to an ISO8601 string value. | XMPDateTime | ||
convertISO8601ToDate(iso8601:String):Date
[static] Converts an ISO8601 string value to a
XMPDateTime object. | XMPDateTime | ||
createFromDate(date:Date, ignoreTZ:Boolean = false):XMPDateTime
[static]
Converts a JavaScript Date object to an
XMPDateTime object. | XMPDateTime | ||
createFromISO8601(iso8601:String):XMPDateTime
[static]
Converts an ISO8601 date string to an
XMPDateTime object. | XMPDateTime | ||
hasTime():Boolean
Checks that the time has been explicitly set with
hour, minute, second, and millisecond values.
| XMPDateTime | ||
hasTimeZone():Boolean
Checks that the time zone has been explicitly set.
| XMPDateTime | ||
setLocalTimezone():void
Sets the time-zone value for date-time using the regional settings
of the operating system.
| XMPDateTime | ||
toDate(ignoreTimezone:Boolean = false):Date
Converts this object into a JavaScript-style Date object.
| XMPDateTime | ||
toISO8601String():String
Converts this
XMPDateTime into an ISO 8601 string. | XMPDateTime | ||
toString():String
Converts a
XMPDateTime object to its string representation. | XMPDateTime | ||
toUTCDate():Date
Converts this date-time to universal coordinated time (UTC).
| XMPDateTime |
day | property |
day:int
[read-write]Retrieves the day-of-month value from a date-time.
Implementation public function get day():int
public function set day(value:int):void
hour | property |
hour:int
[read-write]Retrieves the hour value from a date-time.
Implementation public function get hour():int
public function set hour(value:int):void
milliSecond | property |
milliSecond:int
[read-write]Retrieves the milliseconds value for a time value.
Implementation public function get milliSecond():int
public function set milliSecond(value:int):void
minute | property |
minute:int
[read-write]Retrieves the minute value from a date-time.
Implementation public function get minute():int
public function set minute(value:int):void
month | property |
month:int
[read-write]Retrieves the month value from a date-time.
Implementation public function get month():int
public function set month(value:int):void
second | property |
second:int
[read-write]Retrieves the second value from a date-time.
Implementation public function get second():int
public function set second(value:int):void
timezoneHour | property |
timezoneHour:int
[read-only]Retrieves the hours portion of the time-zone offset.
Implementation public function get timezoneHour():int
timezoneMinute | property |
timezoneMinute:int
[read-only]Retrieves the minutes portion of the time-zone offset.
Implementation public function get timezoneMinute():int
timezoneOffset | property |
timezoneOffset:int
[read-write]Retrieves the time-zone offset from a date-time, in minutes.
Implementation public function get timezoneOffset():int
public function set timezoneOffset(value:int):void
year | property |
year:int
[read-write]Retrieves the year value from a date-time.
Implementation public function get year():int
public function set year(value:int):void
convertDateToISO8601 | () | method |
public static function convertDateToISO8601(date:Date, ignoreTZ:Boolean = false):String
Converts a XMPDateTime
object to an ISO8601 string value.
date:Date — The Date object.
|
|
ignoreTZ:Boolean (default = false ) — True to ignore the time zone. Default is false
|
String — The ISO8601 string value.
|
convertISO8601ToDate | () | method |
public static function convertISO8601ToDate(iso8601:String):Date
Converts an ISO8601 string value to a XMPDateTime
object.
iso8601:String — The date string to convert.
|
Date — The Date object.
|
createFromDate | () | method |
public static function createFromDate(date:Date, ignoreTZ:Boolean = false):XMPDateTime
Converts a JavaScript Date object to an XMPDateTime
object.
date:Date — The JavaScript Date object.
|
|
ignoreTZ:Boolean (default = false ) — True to ignore the time zone. Default is false
|
XMPDateTime —
The new XMPDateTime object.
|
createFromISO8601 | () | method |
public static function createFromISO8601(iso8601:String):XMPDateTime
Converts an ISO8601 date string to an XMPDateTime
object.
iso8601:String — The date string.
|
XMPDateTime —
The new XMPDateTime object.
|
hasTime | () | method |
public function hasTime():Boolean
Checks that the time has been explicitly set with hour, minute, second, and millisecond values. The time value 00:00:00 can represent 12:00 am, but is also the default state when no time has been specified. Use this to distinguish a zero-value that has been set, from a zero-value that results from no explicit value having been specified.
ReturnsBoolean — True if the time has been explicitly set.
|
hasTimeZone | () | method |
public function hasTimeZone():Boolean
Checks that the time zone has been explicitly set. Use this to distinguish a zero-value that has been set, from a zero-value that results from no explicit value having been specified.
ReturnsBoolean — True if the time zone has been set explicitly.
|
setLocalTimezone | () | method |
public function setLocalTimezone():void
Sets the time-zone value for date-time using the regional settings of the operating system. This must only be called when all other fields are filled in to make sure that daylight saving is respected in the calculation.
toDate | () | method |
public function toDate(ignoreTimezone:Boolean = false):Date
Converts this object into a JavaScript-style Date object.
ParametersignoreTimezone:Boolean (default = false ) — True to ignore the time zone. Default is false
|
Date — The JavaScript Date object.
|
toISO8601String | () | method |
public function toISO8601String():String
Converts this XMPDateTime
into an ISO 8601 string.
Formats the date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:
Note: ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows any year, even negative ones. The year is formatted as "%.4d".
ReturnsString — The ISO 8601 string.
|
toString | () | method |
public function toString():String
Converts a XMPDateTime
object to its string representation.
String — The date string, formatted according to ISO8601.
|
See also
toUTCDate | () | method |
public function toUTCDate():Date
Converts this date-time to universal coordinated time (UTC).
ReturnsDate — A new XMPDateTime object.
|