![]() ![]() Similarly, the subtract() method is shown below. add ( 7, 'years' ) // adds 7 years to current date add ( 7, 'months' ) // adds 7 months to current date moment ( ). add ( 7, 'days' ) // adds 7 days to current date moment ( ). The following example shows how seven days, months, or weeks are added to the current date. This is achieved via the add() and subtract() methods. For example, you can add or subtract days, months, years, etc. ![]() There are a number of options for manipulating the moment object. You can read more about these and other available flags on the project’s homepage. nullInput – Set when the entered date is null.empty – Set when the entered date contains nothing parsable.invalidMonth – Set when the month is invalid, like Jannnuaarry. ![]() An example would be the 13th month or 32nd day.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |