UTC() 공개 정적인 메소드

Given the components of a UTC date, returns the number of milliseconds since January 1, 1970, 00:00:00 UTC to that date.
This method differs from the Date constructor in two ways: 1. The date components are specified in UTC time rather than local time. 2. A number is returned instead of a Date instance. If any of the parameters are out of range, then the other values are modified accordingly.
public static UTC ( int year, int month, int day = 1, int hour, int minute, int second, int millisecond ) : double
year int The full year.
month int The month as an integer between 0 and 11 (january to december).
day int The day of the month, from 1 to 31. Defaults to 1.
hour int The number of hours since midnight, from 0 to 23. Defaults to 0.
minute int The number of minutes, from 0 to 59. Defaults to 0.
second int The number of seconds, from 0 to 59. Defaults to 0.
millisecond int The number of milliseconds, from 0 to 999. Defaults to 0.
리턴 double
예제 #1
0
 public static double UTC(int year, int month, int day = 1, int hour = 0,
                          int minute = 0, int second = 0, int millisecond = 0)
 {
     return(DateInstance.UTC(year, month, day, hour, minute, second, millisecond));
 }
예제 #2
0
 public static double UTC(int year, int month, [DefaultParameterValue(1)] int day = 1, [DefaultParameterValue(0)] int hour = 0,
                          [DefaultParameterValue(0)] int minute = 0, [DefaultParameterValue(0)] int second = 0, [DefaultParameterValue(0)] int millisecond = 0)
 {
     return(DateInstance.UTC(year, month, day, hour, minute, second, millisecond));
 }