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:

WebDNA on FreeVSD? (2002) Search inside Include (1998) [WebDNA] [OT] thanks. (2009) error (2000) X etc.... (1999) FREE Web Server Monitor FREE (1997) Using the sendmail command on CGate Pro (Unix) (2000) Web Catalog 2 demo (1997) WebCat2.0b15-to many nested [xx] tags (1997) dates and hex formatting (1997) Moment of Thanks (1997) Word wrapping (1997) WebCat2 - storing unformatted date data? (1997) Encypt Question - Making New Users.db (1999) Help with Repost Data msg from form (1997) Can WC remember people? (1998) problems with 2 tags (1997) Date format problems (1997) Emailer setup (1997) Show items based on login Password (2003)