CrossDate

trait CrossDate
Companion
object
class Any

Value members

Abstract methods

def dayOfMonth: Int

Evaluates to the day of the month (1-31) for the specified date according to local time.

Evaluates to the day of the month (1-31) for the specified date according to local time.

def dayOfWeek: Int

Evaluates to the day of the week (1-7) for the specified date according to local time.

Evaluates to the day of the week (1-7) for the specified date according to local time.

def dayOfYear: Int

Evaluates to the day of the year (0-365) for the specified date according to local time.

Evaluates to the day of the year (0-365) for the specified date according to local time.

def hour24: Int

Evaluates to the hour within the date. E.g., at 10:04:15.250 PM, hour24 is 10. Note this is "military time".

Evaluates to the hour within the date. E.g., at 10:04:15.250 PM, hour24 is 10. Note this is "military time".

def isAM: Boolean

Evaluates to false if hour24 is less than 12; otherwise 'true'.

Evaluates to false if hour24 is less than 12; otherwise 'true'.

def milliOfSecond: Int

Evaluates to the millisecond within the second. E.g., at 10:04:15.250 PM, milliOfSecond is 250.

Evaluates to the millisecond within the second. E.g., at 10:04:15.250 PM, milliOfSecond is 250.

def milliseconds: Long

A field containing the numeric value corresponding to the current time - the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

A field containing the numeric value corresponding to the current time - the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

def minuteOfHour: Int

Evaluates to the minute within the hour. E.g., at 10:04:15.250 PM, minuteOfHour is 4.

Evaluates to the minute within the hour. E.g., at 10:04:15.250 PM, minuteOfHour is 4.

def month: Int

Evaluates to the month (0-11) in the specified date according to local time.

Evaluates to the month (0-11) in the specified date according to local time.

def secondOfMinute: Int

Evaluates to the second within the minute. E.g., at 10:04:15.250 PM, secondOfMinute is 15.

Evaluates to the second within the minute. E.g., at 10:04:15.250 PM, secondOfMinute is 15.

def timeZone: String

A string representing the abbreviation for the time zone. This value will be adjusted as necessary for Daylight Saving Time.

A string representing the abbreviation for the time zone. This value will be adjusted as necessary for Daylight Saving Time.

Evaluates to the time difference between UTC time and local time, in minutes. If UTC is in the future relative to local time, this will be positive.

Evaluates to the time difference between UTC time and local time, in minutes. If UTC is in the future relative to local time, this will be positive.

def year: Int

Evaluates to the year (4 digits for 4-digit years) of the specified date according to local time.

Evaluates to the year (4 digits for 4-digit years) of the specified date according to local time.

Concrete methods

def A: String

Locale-specific full name of the day of the week, e.g. "Sunday", "Monday"

Locale-specific full name of the day of the week, e.g. "Sunday", "Monday"

def B: String

Locale-specific full month name, e.g. "January", "February".

Locale-specific full month name, e.g. "January", "February".

def C: String

Four-digit year divided by 100, formatted as two digits with leading zero as necessary, i.e. 00 - 99

Four-digit year divided by 100, formatted as two digits with leading zero as necessary, i.e. 00 - 99

def D: String

Date formatted as "%tm/%td/%ty".

Date formatted as "%tm/%td/%ty".

def F: String

ISO 8601 complete date formatted as "%tY-%tm-%td".

ISO 8601 complete date formatted as "%tY-%tm-%td".

def H: String

Hour of the day for the 24-hour clock, formatted as two digits with a leading zero as necessary i.e. 00 - 23

Hour of the day for the 24-hour clock, formatted as two digits with a leading zero as necessary i.e. 00 - 23

def I: String

Hour for the 12-hour clock, formatted as two digits with a leading zero as necessary, i.e. 01 - 12.

Hour for the 12-hour clock, formatted as two digits with a leading zero as necessary, i.e. 01 - 12.

def L: String

Millisecond within the second formatted as three digits with leading zeros as necessary, i.e. 000 - 999.

Millisecond within the second formatted as three digits with leading zeros as necessary, i.e. 000 - 999.

def M: String

Minute within the hour formatted as two digits with a leading zero as necessary, i.e. 00 - 59.

Minute within the hour formatted as two digits with a leading zero as necessary, i.e. 00 - 59.

def P: String

Locale-specific morning or afternoon marker in upper case, e.g."AM" or "PM".

Locale-specific morning or afternoon marker in upper case, e.g."AM" or "PM".

def Q: String

A field containing the numeric value in String form corresponding to the current time - the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

A field containing the numeric value in String form corresponding to the current time - the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

def R: String

Time formatted for the 24-hour clock as "%tH:%tM"

Time formatted for the 24-hour clock as "%tH:%tM"

def S: String

Seconds within the minute, formatted as two digits with a leading zero as necessary, i.e. 00 - 60 ("60" is a special value required to support leap seconds).

Seconds within the minute, formatted as two digits with a leading zero as necessary, i.e. 00 - 60 ("60" is a special value required to support leap seconds).

def T: String

Time formatted for the 24-hour clock as "%tH:%tM:%tS".

Time formatted for the 24-hour clock as "%tH:%tM:%tS".

def Y: String

Year, formatted as at least four digits with leading zeros as necessary, e.g. 0092 equals 92 CE for the Gregorian calendar.

Year, formatted as at least four digits with leading zeros as necessary, e.g. 0092 equals 92 CE for the Gregorian calendar.

def Z: String

A string representing the abbreviation for the time zone. This value will be adjusted as necessary for Daylight Saving Time.

A string representing the abbreviation for the time zone. This value will be adjusted as necessary for Daylight Saving Time.

def a: String

Locale-specific short name of the day of the week, e.g. "Sun", "Mon"

Locale-specific short name of the day of the week, e.g. "Sun", "Mon"

def b: String

Locale-specific abbreviated month name, e.g. "Jan", "Feb".

Locale-specific abbreviated month name, e.g. "Jan", "Feb".

def c: String

Date and time formatted as "%ta %tb %td %tT %tZ %tY", e.g. "Sun Jul 20 16:17:00 EDT 1969".

Date and time formatted as "%ta %tb %td %tT %tZ %tY", e.g. "Sun Jul 20 16:17:00 EDT 1969".

def d: String

Day of month, formatted as two digits with leading zeros as necessary, i.e. 01 - 31

Day of month, formatted as two digits with leading zeros as necessary, i.e. 01 - 31

def e: String

Day of month, formatted as two digits, i.e. 1 - 31.

Day of month, formatted as two digits, i.e. 1 - 31.

def h: String

Same as 'b'.

Same as 'b'.

def hour12: Int

Evaluates to the standard 12-hour time format for the current date.

Evaluates to the standard 12-hour time format for the current date.

def isPM: Boolean

Evaluates to 'true' if 'hour24' is 12-24

Evaluates to 'true' if 'hour24' is 12-24

def j: String

Day of year, formatted as three digits with leading zeros as necessary, e.g. 001 - 366 for the Gregorian calendar.

Day of year, formatted as three digits with leading zeros as necessary, e.g. 001 - 366 for the Gregorian calendar.

def k: String

Hour of the day for the 24-hour clock, i.e. 0 - 23.

Hour of the day for the 24-hour clock, i.e. 0 - 23.

def l: String

Hour for the 12-hour clock, i.e. 1 - 12.

Hour for the 12-hour clock, i.e. 1 - 12.

def m: String

Month, formatted as two digits with leading zeros as necessary, i.e. 01 - 13.

Month, formatted as two digits with leading zeros as necessary, i.e. 01 - 13.

def p: String

Locale-specific morning or afternoon marker in lower case, e.g."am" or "pm".

Locale-specific morning or afternoon marker in lower case, e.g."am" or "pm".

def r: String

Time formatted for the 12-hour clock as "%tI:%tM:%tS %Tp". The location of the morning or afternoon marker ('%Tp') may be locale-dependent.

Time formatted for the 12-hour clock as "%tI:%tM:%tS %Tp". The location of the morning or afternoon marker ('%Tp') may be locale-dependent.

def s: String

A field containing the numeric value in String form corresponding to the current time - the number of seconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

A field containing the numeric value in String form corresponding to the current time - the number of seconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

def secondsOfEpoch: Long

A field containing the numeric value corresponding to the current time - the number of seconds elapsed

A field containing the numeric value corresponding to the current time - the number of seconds elapsed

  • since January 1, 1970 00:00:00 UTC, with leap seconds ignored. Roughly the point in time this date represents.

Evaluates to the time difference between UTC time and local time, in hours.

Evaluates to the time difference between UTC time and local time, in hours.

Evaluates to the time difference between UTC time and local time, in minutes.

Evaluates to the time difference between UTC time and local time, in minutes.

def y: String

Last two digits of the year, formatted with leading zeros as necessary, i.e. 00 - 99.

Last two digits of the year, formatted with leading zeros as necessary, i.e. 00 - 99.

def z: String

RFC 822 style numeric time zone offset from GMT, e.g. -0800. This value will be adjusted as necessary for Daylight Saving Time.

RFC 822 style numeric time zone offset from GMT, e.g. -0800. This value will be adjusted as necessary for Daylight Saving Time.