Basket #58852 (Version: ) - Miva - Snippets
<mvt:assign name="l.settings:advancemonth" value="padl(s.dyn_tm_mon, 2,0)"/> <mvt:assign name="l.settings:thisday" value="padl(s.dyn_tm_mday, 2,0)"/> <mvt:if expr ="l.settings:advancemonth EQ 1"> <mvt:assign name="l.settings:over28" value="'29,30,31'"/> <mvt:if expr ="l.settings:thisday CIN l.settings:over28"> <mvt:assign name="l.settings:thisday" value="'28'"/> </mvt:if> <mvt:else> <mvt:assign name="l.settings:over30" value="'31'"/> <mvt:if expr ="l.settings:thisday CIN l.settings:over30"> <mvt:assign name="l.settings:thisday" value="'30'"/> </mvt:if> </mvt:if> <mvt:if expr ="l.settings:advancemonth EQ 12"> <mvt:assign name="l.settings:advancemonth" value="'01'"/> <mvt:else> <mvt:assign name="l.settings:advancemonth" value="l.settings:advancemonth+1"/> </mvt:if> <mvt:assign name="g.YMDDate" value="s.dyn_tm_year$'-'$l.settings:advancemonth$'-'$l.settings:thisday"/> <mvt:comment> ###### This writes YYYY-MM-DD format one month in advance. ###### </mvt:comment> <mvt:comment> ###### IF the order was placed on January 29,30,31 it will advance the date to February the 28th. ###### </mvt:comment> <mvt:comment> ###### ELSE if the order was placed on the "31st" it will advance the date one month to the 30th. ###### </mvt:comment> &mvt:global:YMDDate;