Moment Class |
Namespace: MomentSharp
The Moment type exposes the following members.
Name | Description | |
---|---|---|
![]() | Moment |
Get's a new Moment defaulting values to DateTime.UtcNow, unless zero is true in which values
will be set to the min value
|
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.) |
Name | Description | |
---|---|---|
![]() | Day |
Date's Day
|
![]() | Hour |
Date's Hour
|
![]() | Language |
Local/Language to use
|
![]() | Millisecond |
Date's Millisecond
|
![]() | Minute |
Date's Minute
|
![]() | Month |
Date's Month
|
![]() | Second |
Date's Second
|
![]() | Year |
Date's Year
|