Alga.js
  • Introduction
  • Installation
  • Array
    • $.array.insert
    • $.array.update
    • $.array.destroy
    • $.array.select
    • $.array.hidden
    • $.array.search
    • $.array.filter
    • $.array.paginate
    • $.array.sort
    • $.array.setOperations
    • $.array.sum
    • $.array.calculate
  • Object
    • $.object.remove
  • String & Char
    • $string.split
    • $.char.random
  • Number (Int & Float)
    • $.number.calc
    • $.number.currency
  • Date
    • $.date.now
    • $.date.format
    • $.date.parse
    • $.date.days
    • $.date.weeks
    • $.date.months
    • $date.calendar
Powered by GitBook
On this page

Was this helpful?

  1. Date

$.date.parse

Parse method of date helpers

To be able to parse the custom date to the actual or javascript date, we need a helper to do that, that why this parse method born. This parse method can parse any date format that match with its arguments, this parse method only have 2 arguments which is custom date argument and date format argument, both of these argument are in string.

$date.parse('04-04-2021', 'DD-MM-YYYY')
//=> Sun Apr 04 2021 11:38:06 GMT+0700
Previous$.date.formatNext$.date.days

Last updated 3 years ago

Was this helpful?