[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 ..
ढ्याउ गर्दा दसैँको खसी गनाउच
I hope all the fake Nepali refugee get deported
and it begins - on Day 1 Trump will begin operations to deport millions of undocumented immigrants
To Sajha admin
Travel Document for TPS (approved)
All the Qatar ailines from Nepal canceled to USA
MAGA मार्का कुरा पढेर दिमाग नखपाउनुस !
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