@bitbybit-dev/base
Version:
Bit By Bit Developers Base CAD Library to Program Geometry
272 lines (271 loc) • 7.33 kB
JavaScript
/* eslint-disable @typescript-eslint/no-namespace */
// tslint:disable-next-line: no-namespace
export var Dates;
(function (Dates) {
class DateDto {
constructor(date) {
if (date !== undefined) {
this.date = date;
}
}
}
Dates.DateDto = DateDto;
class DateStringDto {
constructor(dateString) {
if (dateString !== undefined) {
this.dateString = dateString;
}
}
}
Dates.DateStringDto = DateStringDto;
class DateSecondsDto {
constructor(date, seconds) {
/**
* The seconds of the date
* @default 30
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.seconds = 30;
if (date !== undefined) {
this.date = date;
}
if (seconds !== undefined) {
this.seconds = seconds;
}
}
}
Dates.DateSecondsDto = DateSecondsDto;
class DateDayDto {
constructor(date, day) {
/**
* The day of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.day = 1;
if (date !== undefined) {
this.date = date;
}
if (day !== undefined) {
this.day = day;
}
}
}
Dates.DateDayDto = DateDayDto;
class DateYearDto {
constructor(date, year) {
/**
* The year of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.year = 1;
if (date !== undefined) {
this.date = date;
}
if (year !== undefined) {
this.year = year;
}
}
}
Dates.DateYearDto = DateYearDto;
class DateMonthDto {
constructor(date, month) {
/**
* The month of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.month = 1;
if (date !== undefined) {
this.date = date;
}
if (month !== undefined) {
this.month = month;
}
}
}
Dates.DateMonthDto = DateMonthDto;
class DateHoursDto {
constructor(date, hours) {
/**
* The hours of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.hours = 1;
if (date !== undefined) {
this.date = date;
}
if (hours !== undefined) {
this.hours = hours;
}
}
}
Dates.DateHoursDto = DateHoursDto;
class DateMinutesDto {
constructor(date, minutes) {
/**
* The minutes of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.minutes = 1;
if (date !== undefined) {
this.date = date;
}
if (minutes !== undefined) {
this.minutes = minutes;
}
}
}
Dates.DateMinutesDto = DateMinutesDto;
class DateMillisecondsDto {
constructor(date, milliseconds) {
/**
* The milliseconds of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.milliseconds = 1;
if (date !== undefined) {
this.date = date;
}
if (milliseconds !== undefined) {
this.milliseconds = milliseconds;
}
}
}
Dates.DateMillisecondsDto = DateMillisecondsDto;
class DateTimeDto {
constructor(date, time) {
/**
* The time of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.time = 1;
if (date !== undefined) {
this.date = date;
}
if (time !== undefined) {
this.time = time;
}
}
}
Dates.DateTimeDto = DateTimeDto;
class CreateFromUnixTimeStampDto {
constructor(unixTimeStamp) {
/**
* The unix time stamp
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.unixTimeStamp = 1;
if (unixTimeStamp !== undefined) {
this.unixTimeStamp = unixTimeStamp;
}
}
}
Dates.CreateFromUnixTimeStampDto = CreateFromUnixTimeStampDto;
class CreateDateDto {
constructor(year, month, day, hours, minutes, seconds, milliseconds) {
/**
* The year of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.year = 1;
/**
* The month of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.month = 1;
/**
* The day of the month
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.day = 1;
/**
* The hours of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.hours = 1;
/**
* The minutes of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.minutes = 1;
/**
* The seconds of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.seconds = 1;
/**
* The milliseconds of the date
* @default 1
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.milliseconds = 1;
if (year !== undefined) {
this.year = year;
}
if (month !== undefined) {
this.month = month;
}
if (day !== undefined) {
this.day = day;
}
if (hours !== undefined) {
this.hours = hours;
}
if (minutes !== undefined) {
this.minutes = minutes;
}
if (seconds !== undefined) {
this.seconds = seconds;
}
if (milliseconds !== undefined) {
this.milliseconds = milliseconds;
}
}
}
Dates.CreateDateDto = CreateDateDto;
})(Dates || (Dates = {}));