[Remind-Fans] How to get reminders every 2 years?
Sector11
Sector11 at fibertel.com.ar
Sat Sep 22 18:59:08 EDT 2018
One can also test this with "faketime"
DESCRIPTION
The given command will be tricked into believing that the current
system time is the one specified in the timestamp. The wall clock will
continue to run from this date and time unless specified otherwise (see
advanced options). Actually, faketime is a simple wrapper for libfaketime,
which uses the LD_PRELOAD mechanism to load a small library which inter‐
cepts system calls to functions such as time(2) and fstat(2). This wrapper
exposes only a subset of libfaketime's functionality; please refer to the
README file that came with faketime for more details and
advanced options, or have a look at
http://github.com/wolfcw/libfaketime
I have it from Debian repos
On Sat, 22 Sep 2018 15:39:14 -0500
Tim Chase <remind at tim.thechases.com> wrote:
> On 2018-09-22 19:04, Claudio Pighin wrote:
> > Consider that I am not an expert and that I have difficulty on
> > understanding the computer language.
>
> Ah, sorry, I didn't want to talk down to you if you already knew the
> geekiness involved but should also have asked if you wanted
> additional details. The "%" is the "modulo" operator, also known as
> the "remainder" when you do division. So the expression
>
> $Ty % 2
>
> means "take the trigger year ($Ty) and divide it by two and give me
> the remainder". This remainder will either be 0 (it was an even year)
> or 1 (it was an odd year). Then test for equality then expresses
> which you want: did you want the even year ("== 0") or did you want
> the odd year ("== 1")
>
> Likewise for every 4th year, you divide by 4 and get the remainder
>
> $Ty % 4
>
> and then specify which offset of those 4 years you want
>
> $Ty % 4 == 0 # 2000, 2004, 2008, ...
> $Ty % 4 == 1 # 2001, 2005, 2009, ...
> $Ty % 4 == 2 # 2002, 2006, 2010, ...
> $Ty % 4 == 3 # 2003, 2007, 2011, ...
>
> Hopefully that strikes the balance...helpful enough to empower you to
> tweak it as needed, but not so geeky as to give you traumatic
> flashbacks of middle-school math classes and doing long-division by
> hand. ;-)
>
> > verified that it works fine today 22 September 2018 and should
> > also be valid in 2020, 2022, etc.
>
> Indeed, for anything more complex than a fixed date or date-range
> (that I can usually copy/paste from elsewhere in my remind files), I
> always test a bunch of dates to make sure it's doing what I think it
> should.
>
> Best wishes,
>
> -tim
>
>
>
>
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/cgi-bin/mailman/listinfo/remind-fans
> Remind is at http://www.roaringpenguin.com/products/remind
More information about the Remind-fans
mailing list