[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 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS EAD auto extended to June 2025 or just TPS?
Toilet paper or water?
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
TPS advance parole Travel document i-131, Class of Admission ?
Tourist Visa - Seeking Suggestions and Guidance
Now Trump is a convicted criminal .
Ajay Kumar Dev sentenced to 378 yrs
Biden said he will issue new Employment visa for someone with college degree and job offers
Why Americans reverse park?
Problems of Nepalese students in US
Nepali Passport Renewal
I hope all the fake Nepali refugee get deported
lost $3500 on penny stocks !!!
Biden out, Trump next president, so what’s gonna happen to TPS, termination?
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
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