Class: PartTime
Defined in: | parttime.coffee |
Overview
Creates a "PartTime" instance that represents a single moment in time with placeholder that is useful for compareing repeating moment. Currently, PartTime objects does not support timezones.
Property Summary
- (Integer) year
- such as 2014
- (Integer) month
- 1-12 (not 0-11)
- (Integer) date
- 1-31
- (Integer) hour
- 0-24
- (Integer) minute
- 0-59
- (Integer) second
- 0-59
- (Integer) millisecond
- 0-999
Class Method Summary
- . (Hash) parse(timeString) get parttime data from parttime string
Instance Method Summary
- # (Integer) getFullYear()
- # (Integer) getMonth()
- # (Integer) getDate()
- # (Integer) getHours()
- # (Integer) getMinutes()
- # (Integer) getSeconds()
- # (Integer) getMilliseconds()
- # (Integer) compare(date_c) compare with DateLike
- # (String) toString()
Class Method Details
.
(Hash)
parse(timeString)
get parttime data from parttime string
Constructor Details
#
(void)
constructor(timeString)
make a parttime
Examples:
Construct
new PartTime()
new PartTime('*-10-12')
new PartTime('1970-1-1')
new PartTime('1970-1-1T00:*')
new PartTime('*:00:00.000')
new PartTime('*:*:30')
new PartTime('1970-1-1T00:00:00.000')
Instance Method Details
#
(Integer)
getFullYear()
#
(Integer)
getMonth()
#
(Integer)
getDate()
#
(Integer)
getHours()
#
(Integer)
getMinutes()
#
(Integer)
getSeconds()
#
(Integer)
getMilliseconds()
#
(Integer)
compare(date_c)
compare with DateLike
#
(String)
toString()