Tempcode Identifiers Needed

Post

Posted
Rating:
#3497
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
Well I want the current date to show, and then add 30 to the current date to give the user an idea of when the next payment is due, since payments would be due 30 days from that date (not the end of the month).

I'll play around with the parameters you gave me Chris. Thanks!
Online now: No Back to the top

Post

Posted
Rating:
#3498
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
{$ADD} deals only with regular numbers. If you added 30 to 12 it would make 42, it's not going to know to advance a month, and you can't feed it dates.
PHP would with it's mktime function (its smart enough to carry over overflows), but I don't think there's a way to reconstitute a timestamp from calendar components in Tempcode.

You could try adding 60*60*24*30 to the timestamp though (whatever that comes to in seconds).


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,829 members
  • Our newest member is helpfulinsight
Back to Top