適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
com.adobe.fiber.runtime.lib 

DateTimeFunc  - AS3 ADEP Data Services

套件com.adobe.fiber.runtime.lib
類別public class DateTimeFunc
繼承DateTimeFunc Inheritance Object

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

The DateTimeFunc class defines the implementations of the expression runtime functions for Date and Time functions in the Adobe application modeling language.



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
公用方法
 方法定義自
  
createDate(year:int, month:int, day:int, hour:int, minute:int, second:int, millisecond:int = 0):Date
[靜態] Creates a date in the local timezone.
DateTimeFunc
  
createDateUTC(year:int, month:int, day:int, hour:int, minute:int, second:int, millisecond:int = 0):Date
[靜態] Creates a date in the UTC timezone.
DateTimeFunc
  
dateAdd(part:String, units:int, date:Date):Date
[靜態] Adds units of time to a date.
DateTimeFunc
  
dateCompare(date1:Date, date2:Date):int
[靜態] Takes two dates and returns -1, 0, or 1 depending on whether the first is smaller, equal or larger than the second.
DateTimeFunc
  
dateDiff(part:String, date1:Date, date2:Date):Number
[靜態] Takes a String datepart and two Dates and returns an int number of dateparts between the two Dates.
DateTimeFunc
  
datePart(part:String, date:Date):int
[靜態] Takes a String datepart and a Date and it returns the int value of that part.
DateTimeFunc
  
[靜態] Takes a String datepart and a Date and it returns the int value of that part.
DateTimeFunc
  
[靜態] Returns the int day of week value of a Date param.
DateTimeFunc
  
[靜態] Returns the day of year corresponding to a date input.
DateTimeFunc
  
[靜態] Returns the number of days in a month.
DateTimeFunc
  
[靜態] Returns the number of days in a given year.
DateTimeFunc
  
[靜態] Returns the ordinal (the day's number in the year) for the first day of the specified month.
DateTimeFunc
  
[靜態] Returns the int day value of a Date param.
DateTimeFunc
  
[靜態] Returns the int day value of a Date param.
DateTimeFunc
  
[靜態] Returns the int hour value of a Date param.
DateTimeFunc
  
[靜態] Returns the int hour value of a Date param.
DateTimeFunc
  
[靜態] Returns the int millisecond value of a Date param.
DateTimeFunc
  
[靜態] Returns the int millisecond UTC value of a Date param.
DateTimeFunc
  
[靜態] Returns the int minute value of a Date param.
DateTimeFunc
  
[靜態] Returns the int minute value of a Date param.
DateTimeFunc
  
[靜態] Returns the int month value of a Date param.
DateTimeFunc
  
[靜態] Returns the int month value of a Date param.
DateTimeFunc
  
[靜態] Returns the int quarter value of a Date param.
DateTimeFunc
  
[靜態] Returns the int second value of a Date param.
DateTimeFunc
  
[靜態] Returns the int second value of a Date param.
DateTimeFunc
  
[靜態] Returns the int year value of a Date param.
DateTimeFunc
  
[靜態] Returns int year value of a Date param.
DateTimeFunc
 Inherited
指出物件是否有已定義的指定屬性。
Object
  
[靜態] Returns a boolean indicating whether a year is a leap year or not.
DateTimeFunc
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
  
[靜態] Returns the current date and time.
DateTimeFunc
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
  
[靜態] Returns the current date and time (legacy).
DateTimeFunc
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
 Inherited
會傳回指定之物件的基本值。
Object
  
[靜態] Returns the week of the year for a Date.
DateTimeFunc
  
years(endDate:Date, startDate:Date):int
[靜態] Returns the number of years between two dates.
DateTimeFunc
方法詳細資訊

createDate

()方法
public static function createDate(year:int, month:int, day:int, hour:int, minute:int, second:int, millisecond:int = 0):Date

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Creates a date in the local timezone.

參數

year:int — year
 
month:int — month
 
day:int — day
 
hour:int — hour
 
minute:int — minute
 
second:int — second
 
millisecond:int (default = 0) — Millisecond

傳回值
Date — a new date

createDateUTC

()方法 
public static function createDateUTC(year:int, month:int, day:int, hour:int, minute:int, second:int, millisecond:int = 0):Date

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Creates a date in the UTC timezone.

參數

year:int — Year
 
month:int — Month
 
day:int — Day
 
hour:int — Hour
 
minute:int — Minute
 
second:int — Second
 
millisecond:int (default = 0) — Millisecond

傳回值
Date — New date

dateAdd

()方法 
public static function dateAdd(part:String, units:int, date:Date):Date

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Adds units of time to a date. Units are:

  • yyyy: Year
  • q: Quarter
  • m: Month
  • y: Day of year
  • d: Day
  • w: Weekday
  • ww: Week
  • h: Hour
  • n: Minute
  • s: Second
  • l: Millisecond

參數

part:String — Type of units to add
 
units:int — Number of units
 
date:Date — Date

傳回值
Date — New date; null if date is null

dateCompare

()方法 
public static function dateCompare(date1:Date, date2:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Takes two dates and returns -1, 0, or 1 depending on whether the first is smaller, equal or larger than the second.

參數

date1:Date — First date for comparison
 
date2:Date — Second date for comparison

傳回值
int — int; -1 if date1 < date2, 0 if date1=date2, 1 if date1 > date2. Returns 0 if either date is null;

dateDiff

()方法 
public static function dateDiff(part:String, date1:Date, date2:Date):Number

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Takes a String datepart and two Dates and returns an int number of dateparts between the two Dates.

參數

part:String — String valid datepart
 
date1:Date — Date first comparison date
 
date2:Date — Date second comparison date

傳回值
Number — Value representing number of dateparts between date1 and date2. Returns zero if either date is null;

擲回值
Error — if bad part

datePart

()方法 
public static function datePart(part:String, date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Takes a String datepart and a Date and it returns the int value of that part.

參數

part:String — String valid date part (yyyy, m, y, d, w, ww, h, n, s)
 
date:Date — Date for which part should be returned

傳回值
int — Value representing datepart for given Date. Returns zero if date is null.

datePartUTC

()方法 
public static function datePartUTC(part:String, date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Takes a String datepart and a Date and it returns the int value of that part.

參數

part:String — String valid date part (yyyy, m, y, d, w, ww, h, n, s)
 
date:Date — Date for which part should be returned

傳回值
int — Value representing datepart for given Date. Returns zero if date is null.

dayOfWeek

()方法 
public static function dayOfWeek(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int day of week value of a Date param.

參數

date:Date — Date for which day of week will be returned

傳回值
int — Day of week of input date. Returns -1 if date is null.

dayOfYear

()方法 
public static function dayOfYear(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the day of year corresponding to a date input.

參數

date:Date — Date for which day of year will be returned

傳回值
int — Day of year corresponding to date input. Returns -1 if date is null.

daysInMonth

()方法 
public static function daysInMonth(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the number of days in a month.

參數

date:Date — Date for which number of days in month will be returned

傳回值
int — Number of days in this month. Returns zero if date is null.

daysInYear

()方法 
public static function daysInYear(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the number of days in a given year.

參數

date:Date — Date for which number of days in year will be returned

傳回值
int — Number of days this year. Returns zero if date is null.

firstDayOfMonth

()方法 
public static function firstDayOfMonth(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the ordinal (the day's number in the year) for the first day of the specified month.

參數

date:Date — Date for which first day of month will be returned

傳回值
int — Ordinal for the first day of month param. Returns zero if date is null.

getDay

()方法 
public static function getDay(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int day value of a Date param.

參數

date:Date — Date for which day will be returned

傳回值
int — Day of input date. Returns zero if date is null.

getDayUTC

()方法 
public static function getDayUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int day value of a Date param.

參數

date:Date — Date for which day will be returned

傳回值
int — Day of input date. Returns zero if date is null.

getHour

()方法 
public static function getHour(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int hour value of a Date param.

參數

date:Date — Date for which hour will be returned

傳回值
int — Hour of input date. Returns -1 if date is null.

getHourUTC

()方法 
public static function getHourUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int hour value of a Date param.

參數

date:Date — Date for which hour will be returned

傳回值
int — Hour of input date. Returns -1 if date is null.

getMillisecond

()方法 
public static function getMillisecond(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 4.5
執行階段版本: Flash Player 9, AIR 1.1

Returns the int millisecond value of a Date param.

參數

date:Date — Date for which second will be returned

傳回值
int — Millisecond of input date. Returns -1 if date is null.

getMillisecondUTC

()方法 
public static function getMillisecondUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 4.5
執行階段版本: Flash Player 9, AIR 1.1

Returns the int millisecond UTC value of a Date param.

參數

date:Date — Date for which second will be returned

傳回值
int — Millisecond UTC of input date. Returns -1 if date is null.

getMinute

()方法 
public static function getMinute(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int minute value of a Date param.

參數

date:Date — Date for which minute will be returned

傳回值
int — Minute of input date. Returns -1 if date is null.

getMinuteUTC

()方法 
public static function getMinuteUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int minute value of a Date param.

參數

date:Date — Date for which minute will be returned

傳回值
int — Minute of input date. Return -1 if date is null.

getMonth

()方法 
public static function getMonth(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int month value of a Date param.

參數

date:Date — Date for which month will be returned

傳回值
int — Month of input date. Returns 0 if date is null.

getMonthUTC

()方法 
public static function getMonthUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int month value of a Date param.

參數

date:Date — Date for which month will be returned

傳回值
int — month of input date. Returns 0 if date is null.

getQuarter

()方法 
public static function getQuarter(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int quarter value of a Date param.

參數

date:Date — Date for which quarter will be returned

傳回值
int — Quarter of input date (1-4). Returns 0 if date is null.

getSecond

()方法 
public static function getSecond(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int second value of a Date param.

參數

date:Date — Date for which second will be returned

傳回值
int — Second of input date. Returns -1 if date is null.

getSecondUTC

()方法 
public static function getSecondUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int second value of a Date param.

參數

date:Date — Date for which second will be returned

傳回值
int — Second of input date. Returns -1 if date is null.

getYear

()方法 
public static function getYear(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the int year value of a Date param.

參數

date:Date — Date for which Year will be returned

傳回值
int — Year of input date. Returns zero if date is null.

getYearUTC

()方法 
public static function getYearUTC(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns int year value of a Date param.

參數

date:Date — Date for which Year will be returned

傳回值
int — Year of input date. Returns zero if date is null.

isLeapYear

()方法 
public static function isLeapYear(year:int):Boolean

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns a boolean indicating whether a year is a leap year or not. Differ in logic in years before 1582 (follow Java calendar class).

參數

year:int — int year

傳回值
Boolean — Boolean indicating whether year is a leap year

now

()方法 
public static function now():Date

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the current date and time.

傳回值
Date — the current date and time.

today

()方法 
public static function today():Date

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the current date and time (legacy).

傳回值
Date — the current date and time.

weekOfYear

()方法 
public static function weekOfYear(date:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the week of the year for a Date.

參數

date:Date — Date

傳回值
int — Week of the year. Returns zero if date is null.

years

()方法 
public static function years(endDate:Date, startDate:Date):int

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the number of years between two dates.

參數

endDate:Date — End date
 
startDate:Date — Starting date

傳回值
int — Numbers of years between the start and end dates. Returns -1 if either date is null.




[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。