Lasso Soft Inc. > Home

[ date->max ]

Method

[Date->Max] gets the maximum possible value for one field of the date. Requires one of the following keywords below.

Only one maximum value can be fetched at a time. The maximum value is dependent on the current date/time. For example, the -DayOfMonth selector will return the number of days in the current month.

Keyword Description
-year year
-month month
-week week
-day day
-hour hour
-minute minute
-second second
-weekofyear week of year
-weekofmonth week of month
-dayofmonth day of month
-dayofyear day of year
-dayofweek day of week
-dayofweekinmonth day of week in month
-ampm AM/PM
-hourofday hour of day
-zoneoffset time zone offset
-dstoffset daylight savings time offset
-yearwoy year week of year
-dowlocal local day of week
-extendedyear extended year
-julianday julian day
-millisecondsinday milliseconds in day
  • Syntax
Date Object->max(-Keyword)
Examples
  • Beginner

To return the maximum possible value for one field of the current date:

Use the [Date->Max] method. The following example gets the maximum value for the day of month field of a date.

Code

date('2011-03-21 08:00:00')->max(-dayofmonth)

Result

31
Resources
  • Tips

Note there is a bug in this method for the keyword parameters -day and -dayofmonth. See:

http://www.lassosoft.com/Lasso-9-Issues-Detail/?detail=ACDED4EF

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft