Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 1.33 KB

dateValue.md

File metadata and controls

38 lines (21 loc) · 1.33 KB

vobject.dateValue(dateString='') RFC

This is a DATE value type to represent a calendar date as a value of a property. The object methods closely resembles the dateTimeValue object.

  • dateString is an optional constructor date time string parameter in the format YYYY-MM-DD. If omitted, the dateValue is defaulted to the current date.

Example:

20130714

which translates to July 14th, 2013


dateValue.type = 'dateValue'

Type definition of the value. Useful when used in conjunction with properties.


date.parseDate(dateString)
  • dateString to parse into year, month, day. Expects the format YYYY-MM-DD. Ex: 2013-07-14
date.toDate()
  • returns rendered date string representation of the DATE value type. Ex: 2013-07-14

date.parseICS(ics)
  • ics string to be parsed. Expects format YYYYMMDD. Ex: 20130714
date.toICS()
  • returns rendered iCalendar string representation of the DATE value type. Ex: 20130714