API Reference
TemporalValueTransformer
Formats DateTime, DateTimeOffset and TimeSpan values for display in DataTables. Configure via Settings(s => s.TemporalFormatting(...)).
Inheritance
- Object
- TemporalValueTransformer
Constructors
public TemporalValueTransformer() #Methods
public virtual Boolean TryTransform(Object value, out Object rendered) #BooleanParameters
- value System.Object
- rendered System.Object@
Inherited Methods
Properties
public String DateTimeFormat { get; set; } #Format string used for DateTime values. Defaults to "yyyy-MM-dd HH:mm".
public String DateOnlyFormat { get; set; } #Format string used when a DateTime has TimeOfDay == 00:00:00. Defaults to "yyyy-MM-dd".
public String DateTimeOffsetFormat { get; set; } #Format string used for DateTimeOffset values. When null, uses DateTimeFormat.
public Boolean UtcToLocal { get; set; } #When true, converts UTC DateTime/DateTimeOffset to local time before formatting.
public DataTablesTimeSpanFormat TimeSpanFormat { get; set; } #Formatting mode for TimeSpan values.
public String CustomTimeSpanFormat { get; set; } #Custom TimeSpan format string (e.g., "dd\\:hh\\:mm"). Used only when TimeSpanFormat is Custom.
public Boolean RelativeDates { get; set; } #Show relative "time ago" display for dates (e.g., "3 days ago"). When true, adds data-order and title for sort/tooltip.
public Boolean RelativeTooltip { get; set; } #When RelativeDates is true, adds a tooltip with the absolute timestamp.