StructureJS

0.15.2

A class based utility library for building modular and scalable web platform applications. Features opt-in classes and utilities which provide a solid foundation and toolset to build your next project.

DateUtil Class

Defined in: ts/util/DateUtil.ts:1
Module: util
Parent Module: StructureJS

A helper class that deals with dates.

Index

Show:

Methods

Properties

LONG_DAY_LABELS Array=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] public final static

A list of day names.

Example:

 DateUtil.LONG_DAY_LABELS[1];
 // 'Monday'

LONG_MONTH_LABELS Array=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] public final static

A list of month names.

Example:

 DateUtil.LONG_MONTH_LABELS[1];
 // 'February'

SHORT_DAY_LABELS Array=['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] public final static

A list of short day names

Example:

 DateUtil.SHORT_DAY_LABELS[1];
 // 'Mon'

SHORT_MONTH_LABELS Array=['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] public final

A list of short month names.

Example:

 DateUtil.SHORT_MONTH_LABELS[1];
 // 'Feb'

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

getDaySuffix
(
  • today
)
String public static

Returns the suffix of a given day.

Parameters:

Returns:

Example:

 DateUtil.getDaySuffix(1);
 // 'st'

 DateUtil.getDaySuffix(2);
 // 'nd'

 DateUtil.getDaySuffix(3);
 // 'rd'

 DateUtil.getDaySuffix(4);
 // 'th'

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index