ngx-animating-datepicker
Version:
An Animating Datepicker for Angular 2+, for some smooth date picking :).
78 lines (77 loc) • 1.86 kB
TypeScript
import { Day, Week } from '../models/datepicker.model';
export declare class DatepickerService {
/**
* Get the formatted weekdays
*
* @param language
* @param format
* @param start
*/
static getWeekDays(language: string, format: string, start: string): string[];
/**
* Checks if is a value iso code
*
* @param isoCode
*/
static isValidIsoCode(isoCode: string): boolean;
/**
* Create a week array from the merged day arrays
*
* @param dayArray
*/
static createWeekArray(dayArray: Day[]): Week[];
static getDaysInMonth(year: number, month: number): number;
static isValidDate(value: any): boolean;
/**
* Check if year is a leap year
*
* @param year
*/
static isLeapYear(year: number): boolean;
/**
* Checks to see if value is a valid date
*
* @param value
*/
static isDate(value: Date): boolean;
/**
* Get the year of the next month
*
* @param year
* @param month
*/
static getYearOfNextMonth(year: number, month: number): number;
/**
* Get the next month
*
* @param month
*/
static getNextMonth(month: number): number;
/**
* Get the year of the previous month
*
* @param year
* @param month
*/
static getYearOfPreviousMonth(year: number, month: number): number;
/**
* Get previous motnh
*
* @param month
*/
static getPreviousMonth(month: number): number;
/**
* Check if a date is later
*
* @param date
* @param compareDate
*/
static isLater(date: Date, compareDate: Date): boolean;
/**
* Check if a date is ealrier
*
* @param date
* @param compareDate
*/
static isEarlier(date: Date, compareDate: Date): boolean;
}