Re: Date subtraction

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 44261
interpreted = N
texte = and remember a year is a leap yearIF it is evenly divisible by 4 UNLESS it is evenly divisible by 100 UNLESS it is evenly divisible by 400So, 1996 was a leap year because it was evenly divisible by 4 2000 is because it is divisible by 400 even though it is divisible by 100 2100 although divisible by 4 is not a leap year. 2400 is.So, I just use[showif [date %Y]\4][text show=f]leapyear=leap[/text][/showif] [showif [date %Y]\100][text show=f]leapyear=noleap[/text][/showif] [showif [date %Y]\400][text show=f]leapyear=leap[/text][/showif][search db=^calendardbs/[leapyear].db&eqmonthdatarq=[date %m]...and have two dbs leap.db and noleap.db with the number of days for each month.-- Matthew C. Bohne Web Developer Sandusky Register 314 W. Market St. Sandusky, OH 44870 419-625-5500 ext. 253 matthewbohne@sanduskyregister.com http://www.sanduskyregister.comOn Monday, October 21, 2002 2:27 PM, Rob Marquardt wrote: >on 10/21/02 9:56 AM, John Hill at johnh@genericaddress.com so >noted... > >> I should mention that another clean way to do the days of month problem is to >> create a database with the month and the days of month. Then use [date %m] to >> lookup the days of month. > >Don't forget coding to handle February in leap years. : ) > > >Rob Marquardt >Designer/Resident Wirehead >Toast Design > >800 Washington Avenue North >Minneapolis MN 55401 >612.330.9863 v >612.321.9424 f >www.toastdesign.com > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/ >------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Date subtraction (Alain Russell 2002)
  2. Re: Date subtraction (John Hill 2002)
  3. Re: Date subtraction (Matthew Bohne 2002)
  4. Re: Date subtraction (John Hill 2002)
  5. Re: Date subtraction (Rob Marquardt 2002)
  6. Re: Date subtraction (John Hill 2002)
  7. Re: Date subtraction (NovaDerm Skincare Science 2002)
  8. Re: Date subtraction (John Hill 2002)
  9. Re: Date subtraction (NovaDerm Skincare Science 2002)
  10. Re: Date subtraction (Alain Russell 2002)
  11. Re: Date subtraction (NovaDerm Skincare Science 2002)
  12. Re: Date subtraction (Alain Russell 2002)
  13. Re: Date subtraction (NovaDerm Skincare Science 2002)
  14. Re: Date subtraction (NovaDerm Skincare Science 2002)
  15. Re: Date subtraction (Alain Russell 2002)
  16. Re: Date subtraction (Gary Krockover 2002)
  17. Re: Date subtraction (Alain Russell 2002)
  18. Date subtraction (NovaDerm Skincare Science 2002)
and remember a year is a leap yearIF it is evenly divisible by 4 UNLESS it is evenly divisible by 100 UNLESS it is evenly divisible by 400So, 1996 was a leap year because it was evenly divisible by 4 2000 is because it is divisible by 400 even though it is divisible by 100 2100 although divisible by 4 is not a leap year. 2400 is.So, I just use[showif [date %Y]\4][text show=f]leapyear=leap[/text][/showif] [showif [date %Y]\100][text show=f]leapyear=noleap[/text][/showif] [showif [date %Y]\400][text show=f]leapyear=leap[/text][/showif][search db=^calendardbs/[leapyear].db&eqmonthdatarq=[date %m]...and have two dbs leap.db and noleap.db with the number of days for each month.-- Matthew C. Bohne Web Developer Sandusky Register 314 W. Market St. Sandusky, OH 44870 419-625-5500 ext. 253 matthewbohne@sanduskyregister.com http://www.sanduskyregister.comOn Monday, October 21, 2002 2:27 PM, Rob Marquardt wrote: >on 10/21/02 9:56 AM, John Hill at johnh@genericaddress.com so >noted... > >> I should mention that another clean way to do the days of month problem is to >> create a database with the month and the days of month. Then use [date %m] to >> lookup the days of month. > >Don't forget coding to handle February in leap years. : ) > > >Rob Marquardt >Designer/Resident Wirehead >Toast Design > >800 Washington Avenue North >Minneapolis MN 55401 >612.330.9863 v >612.321.9424 f >www.toastdesign.com > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/ >------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Matthew Bohne

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat2b15MacPlugin - showing [math] (1997) Undocumented changes create problems in webcat 4 ... (2000) All choices on IE different than Netscape (1997) WCS Newbie question (1997) blank page from template (1997) Prices coming up 0.00 (2001) Questions To Answer (1997) Multiple Ad databases? (1997) Bulletin Board (1998) Artwork (1997) many-to-one problem (1998) WebDNA Solutions ... sorry! (1997) New user...how do I create URLs from form fields? (2000) Searchtitle (2000) RE: Problem (1997) Database of Tax Rates? (1997) WebCat2b15MacPlugin - showing [math] (1997) WebMerchant Integration with Verifone's vPOS (1998) Requiring that certain fields be completed (1997) [WebDNA] Cookies & localhost (2008)