I a table I defined the following field:
Field('expiryDate', type='date',
requires=IS_EMPTY_OR(IS_DATE(format='%d-%m-%Y'))
By default the expiryDate is set to request.now, since there's no need to
monthly update
the expiry date, I want to calculate it when the user actually updates or
cancels his account.
So if expiryDate is set to 28-11-2014 and the user updates his account on
6-04-2015, the
expiryDate is 28-04-2015, and when the user updates his account on
30-04-2015, the
expiryDate is 28-05-2015
I had a look at relativedelta to solve this problem, but I wonder whether
there is an easier
way to solve this problem within web2py.
Kind regards,
Annet
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.