$.date.format

Format method of date helpers

Format method is a function for creating readable date with custom name or number in date format. This format method is the same as now method, but the differences between these 2 are on this format method we can input any date format we want and convert it to our format, but for now method we only get the current date with our format.

$.date.format('Sun Apr 04 2021 11:21:14 GMT+0700', 'DD-MM-YYYY')
//=> 04-04-2021

Last updated