home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,513 of 68,980   
   dr.j.r.stockton@gmail.com to Robert Prins   
   Re: Batch Script Yesterday date file for   
   20 Mar 20 08:08:31   
   
   On Thursday, 19 March 2020 19:25:34 UTC, Robert Prins  wrote:   
   > On 2020-03-18 04:42, someone wrote:   
   > > Dear All,   
   > >    
   > > i am new for batch script language.   
   > > can anyone help me to get yesterday date,   
      
   > The routines you need to look at are icj (Date to Julian Day Number) and ijc    
   > (JDN to date). They work for all dates after 0001-03-01, and automagically    
   > selecting the correct calendar (Julian or Gregorian) for the original    
   > change-over of 4/15 October 1582.   
      
   Very few countries changed then.   
      
   ISTM sufficiently simple if the calendar is Gregorian and the machine is not   
   mobile and the date line does not move from one side of the machine to another   
   and the state of Summer Time does not change at midnight, to do something like   
   this, in one's    
   preferred language :   
      
     Get numbers for today's Y, M, D   
     Subtract 1 from D ; if D>0 then break   
     Subtract 1 from M, and set D to the length of that month   
     If M>0 then break   
     Set M to 12 and subtract 1 from Y   
      
   Not tested, so debug before use.   
      
   Swedish and Alaskan historians, for a start, face further difficulties.   
      
   --    
     (c) John Stockton, near London, UK.  Using Google Groups.           |   
    Mail: J.R.""""""""@physics.org - or as Reply-To, if any.             |   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca