Moment Methods |
The Moment type exposes the following members.
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | Calendar(DateTime) | Overloaded.
Will format a date with different strings depending on how close to referenceTime's date (today by default) the
date is.
Emulates: http://momentjs.com/docs/#/displaying/calendar-time/
(Defined by Display.) |
![]() | Calendar(Moment) | Overloaded.
Will format a date with different strings depending on how close to referenceTime's date (today by default) the
date is.
Emulates: http://momentjs.com/docs/#/displaying/calendar-time/
(Defined by Display.) |
![]() | DateTime |
Convert this moment object to a DateTime (Defined by Parse.) |
![]() | DaysInMonth |
Get the number of days in this moment.
(Defined by Display.) |
![]() | From |
moment([2007, 0, 29]).fromNow(); // 4 years ago
moment([2007, 0, 29]).fromNow(showSuffix: false); // 4 years
Emulates http://momentjs.com/docs/#/displaying/fromnow/
(Defined by Display.) |