Present  0.9
 All Classes Files Functions Variables Typedefs Friends Macros Pages
present.h File Reference

Go to the source code of this file.

Macros

#define present_delta(value, unit)   present_delta_constructor_unit_ ## unit (value)
 Shortcut macro to create an instance of a Present delta type, based on a numeric value and a unit. More...
 

Macro Definition Documentation

#define present_delta (   value,
  unit 
)    present_delta_constructor_unit_ ## unit (value)

Shortcut macro to create an instance of a Present delta type, based on a numeric value and a unit.

Possible units and their returned types:

Note that day and week return a DayDelta, not a TimeDelta. If you need a TimeDelta instead in one of these situations, you need to use day_time and week_time.

Examples:

MonthDelta d = present_delta(6, months);
DayDelta d = present_delta(-10, days);
TimeDelta d = present_delta(4, weeks_time);
TimeDelta d = present_delta(1, second);