| Package | org.libspark.utils |
|---|---|
| Class | public class DateUtil |
convertJCalendar(fullyear:uint) :String
getFirstDay(fullyear:uint, month:uint) :uint
getMaxDateLength(date:Date) :int
getMonthName(index:uint, type:uint = 0) :String
getRelativeDateName(date:Date, type:uint = 0) :String
getWeekName(index:uint, type:uint = 0) :String
isLeap(fullyear:uint) :Boolean
public static function convertJCalendar(fullyear:uint):String西暦を和暦に変換します. 対応しているのは明治以降になります(1868年以降)
fullyear:uint
String
public static function getFirstDay(fullyear:uint, month:uint):uint指定の月の最初の曜日を調べます。
fullyear:uint
month:uint
uint
public static function getMaxDateLength(date:Date):int対象となる Date オブジェクトの月の最大日数を返します。
date:Date
int
public static function getMonthName(index:uint, type:uint = 0):String
月を示す文字列を返します.
type の指定によって得られる値
0 : JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER
1 : January, February, March, April, May, June, July, August, September, October, November, December
2 : january, february, march, april, may, june, july, august, september, october, november, december
3 : JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
4 : Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
5 : jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec
6 : 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月
7 : 睦月, 如月, 弥生, 卯月, 皐月, 水無月, 文月, 葉月, 長月, 神無月, 霜月, 師走
index:uint
type:uint (default = 0)
String
public static function getRelativeDateName(date:Date, type:uint = 0):String
引数 date から相対的な日を表す文字列を返します。
type の値は getWeekName のものと同じです
date:Date
type:uint (default = 0)
String
public static function getWeekName(index:uint, type:uint = 0):String
曜日名を取得します.
type の指定によって得られる値
0 : SUNDAY, MONDAY, TUSEDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY
1 : Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
2 : sunday, monday, tuesday, wednesday, thursday, friday, saturday
3 : SUN, MON, TUE, WED, THU, FRI, SAT
4 : Sun, Mon, Tue, Wed, Thu, Fri, Sat
5 : sun, mon, tue, wed, thu, fri, sat
6 : 日曜日, 月曜日, 火曜日, 水曜日, 木曜日, 金曜日, 土曜日
7 : 日, 月, 火, 水, 木, 金, 土
8 : 日曜, 月曜, 火曜, 水曜, 木曜, 金曜, 土曜
index:uint
type:uint (default = 0)
String
public static function isLeap(fullyear:uint):Booleanうるう年かどうかを調べます.
fullyear:uint
Boolean