Click or drag to resize
DisplayCalendar Method (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/

Namespace: MomentSharp
Assembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static string Calendar(
	this Moment moment,
	Moment compareMoment
)

Parameters

moment
Type: MomentSharpMoment
Moment
compareMoment
Type: MomentSharpMoment
Uses DateTime.UtcNow if not provided

Return Value

Type: String
Localized string

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Moment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also