In a Senta Job, each task can have a start and due date. The task won't appear on a task list until the start date has arrived. When the due date passes, the task appears as overdue.
Simple enough... but how do you set up the date offsets?
Basic date offsets
It's quite easy: you can use a simple shorthand to define them, for example:
+1d = 1 day after the job starts
+2w = 2 weeks after the job starts
+3m = 3 months after the job starts
-1w = 1 week before the job starts!
Senta will keep an eye on jobs that are going to start in the future and it knows to schedule tasks beforehand. To learn more, check out our guide to pivotal dates.
Business day offsets
Business day calculations mean you can skip weekends and bank holidays when entering date offsets.
+3b = 3 business days after the job starts
- 4b = 4 business days before the job starts
+1b = find the next business day
You can also put +0b or -0b on the end of a date offset to easily make sure it's a working day:
+0b means "the next business day"
-0b means "the previous business day".
For example, +30d+0b would mean thirty days after the job pivotal date, but if it were a weekend, then actually make it the following Monday.
Likewise, +30d-0b would mean thirty days after the job pivotal date, but if it were a weekend, then actually make it the previous Friday.
Compound date offsets
You can string these together:
+2w+3d = 2 weeks and 3 days after the job starts
-3m+1d = 3 months, less one day, before the job starts
+3m+2w+1d = 3 months, 2 weeks and one day after the job starts
Fixed date offsets
For more complex scenarios, fixed date offsets are useful. Some date offsets are variable, for example "3 months after the job starts". But some are fixed, such as "the end of the last year" or "the end of the next tax year". You can define these with special codes:
e = the end of the month
z = the end of the year
So how do you use these? Much like the other codes:
+1n = the end (Friday) of the current week
+2n = the end (Friday) of the next week
+1e = the end of the current month
+2e = the end of next month
+1z = the end of the current year
+2z = the end of the next year
You can also work backwards to previous periods too:
+0e = the end of the previous month
+0z = the end of the previous year
One important thing to note. If the job start date is the last day of the month, then +1e won't do anything: it will leave you at the end of the current month. This is to ensure that the offsets work in a consistent way for any date. Likewise, if the date is 31/12, then +1z will leave you on 31/12 i.e. it will take you to the end of the current year.
With the fixed date offsets, you have tremendous flexibility to schedule task and set their due dates.
Combining date offsets
You can use a combination of the date offsets listed above to make Senta find specific dates in the calendar.
+0e+1d+3n-1d = the third Thursday of the month
Breaking this down:
+0e = the last day of the previous month
+1d = goes forward one day, so this is now the first day of the month
+3n = goes forward 3 Fridays
-1d = goes back one day, to the third Thursday of the month
-5d-3m+1z+3m+5d = the end of the UK tax year (for any given date)
Functions can be used in date offsets to help with choosing dates in more complex ways, e.g. the earliest of two dates.
A number of functions are available in Senta, for example EARLIEST and LATEST.
For more information we have a separate guide to functions here: guide to functions.