Patterns

Date & time

Date and time formats are used as timestamps on messages, dates within the calendar and to help the user understand when something happened.

Moment.js is used to render the time and date formats in Sprout Social. While the library provides more formats, the versions outlined in this page should be the formats used. The library also provides international formats for all dates and times, therefore examples on this page will only address English-speaking, US formats.

Best practices

  • When referring to a different time zone, include the abbreviated version of the time zone, e.g. Today at 1:25 pm CDT.
  • When using relative time, at some determined point, the date will switch to the month, day, year or numerical format. e.g. Today at 1:25 pm would switch to Aug 16, 2019 1:25 pm or 8/16/2019 1:25 pm.

Date formats

Dates may be formatted in the following ways:

FormatWhen to useExample
Month, Day, YearWhen referring to a specific day of the monthAug 16, 2019
NumericalSpace saving format for day of the month4/29/2019
WeekdayWhen referring to a specific day of the weekFri, Aug 16, 2019
Weekday, NumericalSpace saving format for day of the weekFri, 8/16/2019

Time formats

Times my be formatted in the following ways:

FormatWhen to useExample
TimeWhen referring to a specific point in time1:25 pm
Time + Time ZoneWhen time zone is required1:25 pm CDT

Date & time

Times can be appended to any Date Format, except Calendar formats:

FormatWhen to useExample
Month, Day, YearWhen referring to a specific day of the month and timestampAug 16, 2019 1:25 pm
NumericalSpace saving format for day of the month and timestamp4/29/2019 1:25 pm
WeekdayWhen referring to a specific day of the week and timestampFri, Aug 16, 2019 1:25 pm
Weekday, NumericalSpace saving format for day of the week and timestampFri, 8/16/2019 1:25pm

Date & time ranges

Date and time ranges may be formatted in the following ways:

FormatWhen to useExample
M/DD/YYYY — M/DD/YYYYWhen referring to dates from date picker6/10/2019 — 6/20/2019

Special cases

There are special use cases for time and date formats, those should only be used in the specific behaviors outlined:

FormatWhen to useExample
Month, YearFor use in Calendar (month view)*April 2019
Day NameFor use in Calendar (month view)*Thursday
Day Name, Numerical DayFor use in Calendar (week view)*Thursday 28
ComputerizedFor use in CSV exports2019-08-15 1:25 pm
Time Zones*For use when time zone is requiredCDT
Duration Time on Graph AxesFor use when graphing duration e.g. YouTube Average View Duration graph3:45 (MM:SS)
Duration Time in Table/Card ViewFor use when referencing duration time e.g. Inbox Team Report, YouTube Videos1d 5h 3m 45s
Exported Duration TimeFor use in CSV exports when referencing duration time (unit is in minutes)365.50

*Time Zone can be appended to any time & date format.

Relative Time

There are other ways to refer to date and time, these may be formatted in the following ways:

FormatWhen to useExample
HoursWhen referring to the hour or hours past, up to 24 hours agoan hour ago
2 hours ago
24 hours ago
DayWhen referring to the day or days past, up to 7 days agoa day ago
2 days ago
7 days ago
TodayWhen referring the current dayToday at 1:25pm
YesterdayWhen referring the previous dayYesterday at 1:25 pm
ThisWhen referring to the current year, month, week, dayThis year
This month
This week
This Friday
LastWhen referring to the previous month, week, dayLast month
Last week
Last Friday
FutureWhen referring to a month, week, day in the future3 days from now
Tomorrow at 1:25 pm

Dos & Don’ts

do
Always use the full year format, e.g. 2019
do
Drop the leading “0” before single digit days or months
do
Use tool tips for abbreviated or relative times to show then absolute date and/or time e.g. hovering over “1 month ago” might show “Fri, June 30, 2019 3pm”
don't
Use an abbreviation when referring to the year, e.g. “19” instead of “2019”
don't
Use a leading “0” before single digit days or months

References