date-vir
Version:
Easy and explicit dates and times.
48 lines (47 loc) • 1.37 kB
JavaScript
/**
* Represents various parts of a {@link FullDate}. Each value is also a valid "type" attribute for an
* `<input>` HTML element.
*
* @category Internal
*/
export var FullDatePart;
(function (FullDatePart) {
/**
* Used for `type="date"` HTML `<input>` elements:
* https://developer.mozilla.org/docs/Web/HTML/Element/input/date
*/
FullDatePart["Date"] = "date";
/**
* Used for `type="time"` HTML `<input>` elements:
* https://developer.mozilla.org/docs/Web/HTML/Element/input/time
*/
FullDatePart["Time"] = "time";
/**
* Used for `type="datetime-local"` HTML `<input>` elements:
* https://developer.mozilla.org/docs/Web/HTML/Element/input/datetime-local
*/
FullDatePart["DateTime"] = "datetime-local";
})(FullDatePart || (FullDatePart = {}));
/**
* {@link FullDate} keys used for telling time only.
*
* @category Internal
*/
export var TimeKey;
(function (TimeKey) {
TimeKey["Hour"] = "hour";
TimeKey["Minute"] = "minute";
TimeKey["Second"] = "second";
TimeKey["Millisecond"] = "millisecond";
})(TimeKey || (TimeKey = {}));
/**
* {@link FullDate} keys used for telling the date only.
*
* @category Internal
*/
export var DateKey;
(function (DateKey) {
DateKey["Year"] = "year";
DateKey["Month"] = "month";
DateKey["Day"] = "day";
})(DateKey || (DateKey = {}));