windows.globalization.datetimeformatting
Version:
Use the Windows.Globalization.DateTimeFormatting WinRT API directly from Node.js
232 lines (211 loc) • 8.21 kB
JavaScript
_YearFormat = function () {
this.none = 0;
this.default = 1;
this.abbreviated = 2;
this.full = 3;
}
exports.YearFormat = new _YearFormat();
_MonthFormat = function () {
this.none = 0;
this.default = 1;
this.abbreviated = 2;
this.full = 3;
this.numeric = 4;
}
exports.MonthFormat = new _MonthFormat();
_DayOfWeekFormat = function () {
this.none = 0;
this.default = 1;
this.abbreviated = 2;
this.full = 3;
}
exports.DayOfWeekFormat = new _DayOfWeekFormat();
_DayFormat = function () {
this.none = 0;
this.default = 1;
}
exports.DayFormat = new _DayFormat();
_HourFormat = function () {
this.none = 0;
this.default = 1;
}
exports.HourFormat = new _HourFormat();
_MinuteFormat = function () {
this.none = 0;
this.default = 1;
}
exports.MinuteFormat = new _MinuteFormat();
_SecondFormat = function () {
this.none = 0;
this.default = 1;
}
exports.SecondFormat = new _SecondFormat();
DateTimeFormatter = (function () {
var cls = function DateTimeFormatter() {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(formatTemplate) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(formatTemplate, languages) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(formatTemplate, languages, geographicRegion, calendar, clock) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(yearFormat, monthFormat, dayFormat, dayOfWeekFormat) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(hourFormat, minuteFormat, secondFormat) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
var cls = function DateTimeFormatter(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages, geographicRegion, calendar, clock) {
this.numeralSystem = new String();
this.calendar = new String();
this.clock = new String();
this.geographicRegion = new String();
this.includeDay = new DayFormat();
this.includeDayOfWeek = new DayOfWeekFormat();
this.includeHour = new HourFormat();
this.includeMinute = new MinuteFormat();
this.includeMonth = new MonthFormat();
this.includeSecond = new SecondFormat();
this.includeYear = new YearFormat();
this.languages = new Object();
this.patterns = new Object();
this.resolvedGeographicRegion = new String();
this.resolvedLanguage = new String();
this.template = new String();
};
cls.prototype.format = function format(value) {
/// <signature>
/// <summary>Function summary.</summary>
/// <param name="value" type="Date">A param.</param>
/// <returns type="String" />
/// </signature>
return new String();
}
cls.prototype.format = function format(datetime, timeZoneId) {
/// <signature>
/// <summary>Function summary.</summary>
/// <param name="datetime" type="Date">A param.</param>
/// <param name="timeZoneId" type="String">A param.</param>
/// <returns type="String" />
/// </signature>
return new String();
}
cls.longDate = new DateTimeFormatter();
cls.longTime = new DateTimeFormatter();
cls.shortDate = new DateTimeFormatter();
cls.shortTime = new DateTimeFormatter();
return cls;
}) ();
exports.DateTimeFormatter = DateTimeFormatter;