FutureBasic Logo

<<    Index    >> FutureBasic

date, date$   function

CFStringDate = date( formatCFString )
PascalStringDate = date$( formatPascalString )

date and date$ return a string based on the current date. A formatCFString or formatPascalString controls output formatting.

The formatCFString or formatPascalString must contain Unicode Date and Time symbols as shown below and found in Appendix I - Data & Time Symbols.

NSLog( @"%@", date ) // default format MM/dd/yy
NSLog( @"%@", date(@"MMMM d, yyyy") )
NSLog( @"This is day %@ of the year", date(@"D") )

  April 1, 2018
  This is day 91 of the year

See also
time; Appendix I - Data & Time Symbols