[Show all top banners]
Back to: Computer/IT Refresh page to view new replies
 JAVA languane
SAVE! for ease of future access.
Posted on 05-07-02 10:51 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I am just wondering if there's anybody out there who could possibly help me out writing JavaScript display message for 'DATE'.
Anybody welcome!
 
Posted on 05-08-02 1:03 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

import java.util.Calendar;

class Date {
public static void main(String args[]) {
String months[] = {
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"};

// Create a date initialized with the
// current date and time in the default
// locale and timezone.
Date calendar = Date.getInstance();

// Display current time and date information.
System.out.print("Date: ");
System.out.print(months[calendar.get(Date.MONTH)]);
System.out.print(" " + calendar.get(Date.DATE) + " ");
System.out.println(calendar.get(Date.YEAR));

}
}

I hope this helps you.
Output will be as follows:
Date: May 5 2002

Enjoy!
 
Posted on 05-08-02 1:06 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I'm sorry....there is a mistake in the first one.... this is it.


import java.util.Date;

class Date {
public static void main(String args[]) {
String months[] = {
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"};

// Create a date initialized with the
// current date and time in the default
// locale and timezone.
Date calendar = Date.getInstance();

// Display current time and date information.
System.out.print("Date: ");
System.out.print(months[calendar.get(Date.MONTH)]);
System.out.print(" " + calendar.get(Date.DATE) + " ");
System.out.print(calendar.get(Date.YEAR));
System.out.println(".");

}
}

I hope this helps you.
Output will be as follows:
Date: May 5 2002.

Enjoy!
 
Posted on 05-08-02 11:04 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

You dumb-ass.. don't see what the guy is asking for? javascript not java dummy

//
this will display date and all in detail..also dude remove just '//'
 
Posted on 05-08-02 11:05 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I wrote a javascript to display date... apparently this board is not letting javascript code to display sorry dogg...
 
Posted on 05-08-02 11:28 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanx man! I appreciate your approach.
I will try it.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 30 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
मन भित्र को पत्रै पत्र!
Guess how many vaccines a one year old baby is given
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
emergency donation needed
Travelling to Nepal - TPS AP- PASSPORT
Morning dharahara
nrn citizenship
जाडो, बा र म……
1974 AD Pinjadako Suga Remixed
Susta Susta Degree Maile REMIXED version
Elderly parents travelling to US (any suggestions besides Special Assistance)?
कल्लाई मुर्ख भन्या ?
ढ्याउ गर्दा दसैँको खसी गनाउच
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters