Input date string in DD/MM/YYYY or DD-MM-YYYY format
This method Checks whether date string is Valid Date of birth or not.
This method inserts "/" while entering dates in input element
string entered in input element
This function returns age as a number from the date of birth as an input
birth date of a person in Date format
This function converts date input coming from backend (generally in long format (ex. '2022-02-01T12:16:13')) to a specified format provided in 2nd paramter It converts all types of dates accepted by dayjs
Date input to be converted to another format. This generally comes from backend and is in long format. For example '2022-02-01T12:16:13'
Format in which the date needs to be converted to.
This method can be used to get month name abbreviation from month number.
Month number, eg: for Jan, it is 1
This method is used for getting previous date to the date provided through argument. argument should come through only new Date() Not doing with dayjs as no specific methods for this use case are there.
Date as only new Date()
This method is used for getting previous month with same date to the date provided through argument. Not doing with dayjs as no specific methods for this use case are there.
Date in valid Date format
Number of months we want to go back to
This function returns an array of objects which specify financial years from last supported year to offset year from current financial year.
last year in number from which array of values needs to be returned
offset from current year of the year upto which the values have to be returned
This method Checks whether Age is less than 18 or not.
string entered in input element (ddmmyyyy or dd/mm/yyyy)
This function checks if input date is valid or not in this format 'YYYY-MM-DD'. We can also validate dates in this format also 'YYYY/MM/DD' if we send '/' as 2nd parameter, or basically anything as delimiter(2nd paramter).
Provide delimiter in case date uses other delimiter than '-'.
Generated using TypeDoc
This function converts DD/MM/YYYY to YYYY-MM-DD. JavaScript new Date() method accept date in YYYY-MM-DD or YYYY/MM/DD format that's why we needed this method
This function is needed because dayjs does not work with 'DD/MM/YYYY' type of inputs