Click or drag to resize
Display Class
Contains functions for formatting and displaying of DateTime objects
Inheritance Hierarchy
SystemObject
  MomentSharpDisplay

Namespace: MomentSharp
Assembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static class Display

The Display type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCalendar(Moment, Moment)
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/
Public methodStatic memberCalendar(Moment, DateTime)
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/
Public methodStatic memberDaysInMonth(DateTime)
Get the number of days in this dateTime.
Public methodStatic memberDaysInMonth(Moment)
Get the number of days in this moment.
Public methodStatic memberFrom
moment([2007, 0, 29]).fromNow(); // 4 years ago moment([2007, 0, 29]).fromNow(showSuffix: false); // 4 years Emulates http://momentjs.com/docs/#/displaying/fromnow/
Public methodStatic memberUnixTimeStamp
Returns the number of seconds since the Unix Epoch
Top
See Also