![]() Preserved Topic: how to get the actual date on a string?  | 
  |
|---|---|
| Author | Thread | 
| 
       Paranoid (IV) Mad Scientist From: Omicron Persei 8  | 
    
       
  posted 12-18-2000 02:03
      
      
     | 
  
| 
       Maniac (V) Mad Scientist From: 100101010011 <-- right about here  | 
    
       
  posted 12-18-2000 02:48
      
      Okay I just happened to have written this for a post in the gurusnetwork forum.    | 
  
| 
       Paranoid (IV) Inmate From: New Jersey, USA  | 
    
       
  posted 12-18-2000 03:15
      
      Your not going to believe this, but I just finished writing my first script from scratch, and it was to print out the string "Today is Sunday December 17 2000". *edit* ( It prints out the current day and date)*/edit*  | 
  
| 
       Paranoid (IV) Mad Scientist From: Omicron Persei 8  | 
    
       
  posted 12-18-2000 10:55
      
      thanx bitdamaged and butcher. both work great, BUT:   (hehe)  | 
  
| 
       Maniac (V) Mad Scientist From: 100101010011 <-- right about here  | 
    
       
  posted 12-18-2000 18:57
      
      I haven't worked to much on dates in PHP.  but what you guys both want to do is create a string variable with the date formatted the way you want it.  | 
  
| 
       Paranoid (IV) Inmate From: 127.0.0.1  | 
    
       
  posted 12-18-2000 20:48
      
      Hey bitdamaged -   | 
  
| 
       Maniac (V) Mad Scientist From: Belgrade, Serbia  | 
    
       
  posted 12-18-2000 21:49
      
      1. The correct code that will show month names instead of numbers is:  | 
  
| 
       Paranoid (IV) Inmate From: 127.0.0.1  | 
    
       
  posted 12-19-2000 01:00
      
      You know, this JavaScript is almost starting to make sense to me now.......  | 
  
| 
       Paranoid (IV) Inmate From: New Jersey, USA  | 
    
       
  posted 12-19-2000 02:23
      
      Thanks Bitdamaged for answering my question, sorry for treading on your thread Grumble, but I gotta ask. Could either Bitdamaged or Mr. Max please explain to me why just because you define an array with the 'month' names in it, that var month = monthNames(DateVariable.getMonth()); returns the name of the month instead of the number? Please forgive my ignorance, I'm not doubting what you tell me, I just want to know why it works. Thanks again guys.  | 
  
| 
       Maniac (V) Mad Scientist From: Belgrade, Serbia  | 
    
       
  posted 12-19-2000 08:16
      
      When you define an array like this:   | 
  
| 
       Paranoid (IV) Inmate From: New Jersey, USA  | 
    
       
  posted 12-19-2000 21:33
      
      Sure do, thanks Max.  | 
  
| 
       Paranoid (IV) Mad Scientist From: Omicron Persei 8  | 
    
       
  posted 12-20-2000 12:44
      
      hey, thanx for your help guys...  |