/** * Computes the date from the given arguments interpreting them as UTC with * the <tt>hours</tt>, <tt>minutes</tt>, <tt>seconds</tt> and * <tt>milliseconds</tt> fields set to 0 and returns the corresponding time * value. * * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor * in two ways: it returns a time value as a <tt>Number</tt>, rather than * creating a <tt>Date</tt> object, and it interprets the arguments in UTC * rather than as local time. * * @param year the year (in UTC time zone) * @param month the month of the year (in UTC time zone) * @param day the day of the month (in UTC time zone) * @return the UTC time value corresponding to the given arguments */ public static double UTC(int year, int month, int day) { return UTC(year, month, day, 0); }
/** * Computes the date from the given arguments interpreting them as UTC with * the <tt>day</tt> field set to 1, and the <tt>hours</tt>, <tt>minutes</tt>, * <tt>seconds</tt> and <tt>milliseconds</tt> fields set to 0 and returns * the corresponding time value. * * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor * in two ways: it returns a time value as a <tt>Number</tt>, rather than * creating a <tt>Date</tt> object, and it interprets the arguments in UTC * rather than as local time. * * @param year the year (in UTC time zone) * @param month the month of the year (in UTC time zone) * @return the UTC time value corresponding to the given arguments */ public static double UTC(int year, int month) { return UTC(year, month, 1); }
/** * Computes the date from the given arguments interpreting them as UTC with * the <tt>milliseconds</tt> field set to 0 and returns the corresponding time * value. * * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor * in two ways: it returns a time value as a <tt>Number</tt>, rather than * creating a <tt>Date</tt> object, and it interprets the arguments in UTC * rather than as local time. * * @param year the year (in UTC time zone) * @param month the month of the year (in UTC time zone) * @param day the day of the month (in UTC time zone) * @param hours the hour of the day (in UTC time zone) * @param minutes the minute of the hour (in UTC time zone) * @param seconds the second of the minute (in UTC time zone) * @return the UTC time value corresponding to the given arguments */ public static double UTC(int year, int month, int day, int hours, int minutes, int seconds) { return UTC(year, month, day, hours, minutes, seconds, 0); }
/** * Computes the date from the given arguments interpreting them as UTC with * the <tt>minutes</tt>, <tt>seconds</tt> and <tt>milliseconds</tt> fields * set to 0 and returns the corresponding time value. * * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor * in two ways: it returns a time value as a <tt>Number</tt>, rather than * creating a <tt>Date</tt> object, and it interprets the arguments in UTC * rather than as local time. * * @param year the year (in UTC time zone) * @param month the month of the year (in UTC time zone) * @param day the day of the month (in UTC time zone) * @param hours the hour of the day (in UTC time zone) * @return the UTC time value corresponding to the given arguments */ public static double UTC(int year, int month, int day, int hours) { return UTC(year, month, day, hours, 0); }
/** * Computes the date from the given arguments interpreting them as UTC with * the <tt>seconds</tt> and <tt>milliseconds</tt> fields set to 0 and * returns the corresponding time value. * * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor * in two ways: it returns a time value as a <tt>Number</tt>, rather than * creating a <tt>Date</tt> object, and it interprets the arguments in UTC * rather than as local time. * * @param year the year (in UTC time zone) * @param month the month of the year (in UTC time zone) * @param day the day of the month (in UTC time zone) * @param hours the hour of the day (in UTC time zone) * @param minutes the minute of the hour (in UTC time zone) * @return the UTC time value corresponding to the given arguments */ public static double UTC(int year, int month, int day, int hours, int minutes) { return UTC(year, month, day, hours, minutes, 0); }