Re: Auto entering Friday's date in a field
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 44508
interpreted = N
texte = Modulo is the *whole* number remainder of a division.So 10 mod 5 = 0, because 10/5=2 with remainder 0but 11 mod 5 = 1, because 11/5=2 with a remainder of 1and 11 mod 6 = 0, because there is no *whole* number remainderThus 6 mod 7 = 0, because there is no whole number remainder (6/7 results in a fraction)It's kinda like division without decimals...-WillOn Tuesday, October 29, 2002, at 05:03 PM, Donovan wrote:> I get Monday:>> http://216.81.241.229/modulotest.html>> I think Chris's solution is more complicated than what is stated> but I can't wrap my brain around it because I don't quite get what> the modulo does. But obiously, this code is taking us back to the> prior 6 days BC and calculating something based off of 7 days in> a week. shwew. It's time to go home. I hate you chris. ;-)>> for example. what is:> 6 Mod 7??>> Anyone?>> Donovan>>>> Michael Davis wrote:>>> On Tuesday, October 29, 2002, at 02:42 PM, Donovan wrote:>>>>> [FORMAT days_to_date][MATH]{[DATE]} + (6 - >>> {[DATE]}%7)[/MATH][/FORMAT]>>>>>> Chris List Recipient wrote:>>>>>>> That is mod 7. So yesterday, Monday for example, you get 2. Add>>>> 6-2=4>>>> days to Monday and you get next Friday.>>>>>> What day is 00/00/0000?>>>>>>>>>> Logically, if the first day of the week is Sunday then the first date>> should be a sunday. To test,>> [FORMAT days_to_date %a][MATH]{00/00/0000}[/MATH][/FORMAT] produces >> Sun>> on my OS X server.>>>> Answer: Sunday.>>>> Mike>>>> --> > ----------------------------------------------------------------------- > ->> > ----------------------------------------------------------------------- > ->> <><> Donovan Brooke <><>->ï> > ----------------------------------------------------------------------- > ->> > ----------------------------------------------------------------------- > ->>> -------------------------------------------------------------> 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:
Modulo is the *whole* number remainder of a division.So 10 mod 5 = 0, because 10/5=2 with remainder 0but 11 mod 5 = 1, because 11/5=2 with a remainder of 1and 11 mod 6 = 0, because there is no *whole* number remainderThus 6 mod 7 = 0, because there is no whole number remainder (6/7 results in a fraction)It's kinda like division without decimals...-WillOn Tuesday, October 29, 2002, at 05:03 PM, Donovan wrote:> I get Monday:>> http://216.81.241.229/modulotest.html>> I think Chris's solution is more complicated than what is stated> but I can't wrap my brain around it because I don't quite get what> the modulo does. But obiously, this code is taking us back to the> prior 6 days BC and calculating something based off of 7 days in> a week. shwew. It's time to go home. I hate you chris. ;-)>> for example. what is:> 6 Mod 7??>> Anyone?>> Donovan>>>> Michael Davis wrote:>>> On Tuesday, October 29, 2002, at 02:42 PM, Donovan wrote:>>>>> [FORMAT days_to_date][math]{[date]} + (6 - >>> {[date]}%7)[/MATH][/FORMAT]>>>>>> Chris List Recipient wrote:>>>>>>> That is mod 7. So yesterday, Monday for example, you get 2. Add>>>> 6-2=4>>>> days to Monday and you get next Friday.>>>>>> What day is 00/00/0000?>>>>>>>>>> Logically, if the first day of the week is Sunday then the first date>> should be a sunday. To test,>> [FORMAT days_to_date %a][math]{00/00/0000}[/MATH][/FORMAT] produces >> Sun>> on my OS X server.>>>> Answer: Sunday.>>>> Mike>>>> --> > ----------------------------------------------------------------------- > ->> > ----------------------------------------------------------------------- > ->> <><> Donovan Brooke <><>->ï> > ----------------------------------------------------------------------- > ->> > ----------------------------------------------------------------------- > ->>> -------------------------------------------------------------> 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/
NovaDerm Skincare Science
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:
Date Formats (1997)
Shipping calculations (1997)
calculating tax rates, mail order solutions and version 2 (1997)
search form problem.. (1997)
[WebDNA] 2nd pair of eyes on redirect please (2011)
Decrypt Problems (always include a Subject!!!) (2000)
Goofy Date Sorting (1998)
Checking two required fields (1998)
WYSIWYG-editor for mac (2003)
Email address checker (2002)
search form problem.. (1997)
multi-paragraph fields (1997)
Migrating to NT (1997)
Extended [Concvertchars] needed (1997)
[shownext] and descending order (1997)
Hard Questions ? (1997)
RE: [WebDNA] Moving to Sandbox broke price (2009)
listfiles, moving files (1998)
Help! WebCat2 bug (1997)
Cold Fusion Buster (1997)