24, July 2008
any idea y this script shows 12 noon as AM and not PM? - webmaster forum
This forum shares its ad revenue with its members!
Navigation
Webdigity Services
Pagerank Monitor
Whois Tool
Web Design Gallery
Webmaster Forums
Webmaster Directory
Tutorials Database
Webmaster Forums
WebDigity Community
HumanWorks network new...
Clickbank Contextual S...
Forum Contests
Forum Lounge
New Member Introductions
Tech News
Google Forum
User Forums
aStatSpam forum
Computers
3rd-Party Scripting
The 100 Lists Website ...
PixelThings
Smart Publisher
Forums Talk
Design and Layout
General webmaster disc...
Graphics & Multimedia
Adobe Photoshop
Macromedia Flash & Act...
Web Page Design
HTML & XHTML
CSS
Accesibility issues
Website & Graphic Revi...
Web Development
PhP
PHP classes @finalwebs...
Php User Class
JavaScript
Databases
MySQL
Security
Miscellaneous Languages
ASP & .NET
Java & JSP
Web hosting talk
Hosting companies
Domain names
Configuring your server
Apache web server
Monetizing your site
General Business
CPC programs
Adsense
Chitika eMiniMalls
CPM programs
Affiliate programs & o...
Web site promotion
Promotion techniques
Search Engine Optimiza...
Google SEO
Promoting & building a...
SMF moding & promoting
Marketplace
Advertise your services
Sell your site
Sell a domain name
Request services
Hire people
Link trading requests
[
Home
|
Help
|
Search
|
Forum's Shop
|
Archive
|
Login
|
Register
|
Webmaster Directory
]
Web
www.webdigity.com
Hide the search bar
Whois database search :
Domain :
Use the whois database tool to retrieve information on any top level domain you are interested in.
Webdigity Webmaster Forums
>
Web Development
>
JavaScript
Topic:
any idea y this script shows 12 noon as AM and not PM?
« previous
next »
Pages: [
1
]
Author
Topic: any idea y this script shows 12 noon as AM and not PM? (Read 989 times)
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits
Members referred : 4
«
on:
Jan 04, 2006, 05:19:27 AM »
Code:
function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds; var today;
today = new Date();
intDay = today.getDay();
intDate = today.getDate();
intMonth = today.getMonth();
intYear = today.getYear();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
timeString = DayNam[intDay]+" "+intDate;
if (intDate == 1 || intDate == 21 || intDate == 31) {
timeString= timeString + "st ";
} else if (intDate == 2 || intDate == 22) {
timeString= timeString + "nd ";
} else if (intDate == 3 || intDate == 23) {
timeString= timeString + "rd ";
} else {
timeString = timeString + "th ";
}
if (intYear < 2000){
intYear += 1900;
}
timeString = timeString+" of "+MnthNam[intMonth]+" "+intYear;
if (intHours == 0) {
hours = "12:";
ap = "A";
} else if (intHours < 12) {
hours = intHours+":";
ap = "P";
} else if (intHours == 12) {
hours = "12:";
ap = "A";
} else {
intHours = intHours - 12
hours = intHours + ":";
ap = "P";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes;
} else {
minutes = intMinutes;
}
if (intSeconds < 10) {
seconds = ":0"+intSeconds;
} else {
seconds = ":"+intSeconds;
}
timeString = (document.all)? timeString+", "+hours+minutes+seconds+" "+ap:timeString+" "+hours+minutes+" "+ap;
var clock = (document.all) ? document.all("Clock") : document.getElementById("Clock");
clock.innerHTML = timeString;
(document.all)?window.setTimeout("tick();", 1000):window.setTimeout("tick();", 6000);
}
tick();
have any idea why?
Last blog :
phpHaze 1.59.1 in Development
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits
Members referred : 6
«
Reply #1 on:
Jan 04, 2006, 07:58:32 AM »
Code:
} else if (intHours == 12) {
hours = "12:";
ap = "A";
change the
Code:
ap = "A";
to
Code:
ap = "p";
«
Last Edit: Jan 04, 2006, 08:00:14 AM by Mind_nl
»
free PHP scripts and PHP tutorials
|
The Big Adsventure
|
Lets Work Online!
|
43 Proxies
Last blog :
Are You Stumbling Yet?
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits
Members referred : 4
«
Reply #2 on:
Jan 04, 2006, 08:03:01 AM »
ok i will test this when i get home from work, and i will let you know. thanks for the help.
Last blog :
phpHaze 1.59.1 in Development
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits
Members referred : 4
«
Reply #3 on:
Jan 07, 2006, 03:03:41 AM »
ya seems to be workin great now thx man
Last blog :
phpHaze 1.59.1 in Development
Trackback URI for this entry :
http://www.webdigity.com/trackback.php?topic=1134
Bookmark this thread :
Digg
Del.icio.us
Dzone
more....
Topic sponsors:
Get a permanent link here for $1.99!
Pages: [
1
]
Webdigity Webmaster Forums
>
Web Development
>
JavaScript
Topic:
any idea y this script shows 12 noon as AM and not PM?
« previous
next »
Jump to:
=>Personal Messages
=>My Subscriptions
=>Profile Settings
=>Account Settings
=>Look and Layout Settings
=>Unread Posts
=>Unread Replies To My Posts
=>Affiliate Program
=>Forum's Shop
=>Arcade
Category: WebDigity Community
=> HumanWorks network news & feedback
===> Clickbank Contextual Script Support
=> Forum Contests
=> Forum Lounge
===> New Member Introductions
===> Tech News
===> Google Forum
=> User Forums
Category: Design and Layout
=> General webmaster discussions
=> Graphics & Multimedia
===> Adobe Photoshop
===> Macromedia Flash & Actionscript
=> Web Page Design
===> HTML & XHTML
===> CSS
===> Accesibility issues
=> Website & Graphic Reviews
Category: Web Development
=> PhP
===> PHP classes @finalwebsites.com
=====> Easy PHP Upload
=====> Access_user Class
=====> Validate_fields Class
=====> DB_cart Class
=====> Miscellaneous scripts or snippets
=====> PHP Whois script
=====> 3rd party modifications
===> Php User Class
=> JavaScript
=> Databases
===> MySQL
=> Security
=> Miscellaneous Languages
===> ASP & .NET
===> Java & JSP
=====> Official Java News
Category: Web hosting talk
=> Hosting companies
=> Domain names
=> Configuring your server
===> Apache web server
Category: Monetizing your site
=> General Business
=> CPC programs
===> Adsense
===> Chitika eMiniMalls
=====> Official news from Chitika
=====> Ad placement reviews
=====> eMiniMalls feedback and suggestions
=> CPM programs
=> Affiliate programs & other revenue models
Category: Web site promotion
=> Promotion techniques
=> Search Engine Optimization
===> Google SEO
=> Promoting & building a forum
===> SMF moding & promoting
Category: Marketplace
=> Advertise your services
=> Sell your site
=> Sell a domain name
=> Request services
=> Hire people
=> Link trading requests
User Area
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Jul 24, 2008, 04:00:17 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Donate to our community, and get a permanent link back to your site!
Forum Statistics
Total Posts:
35.717
Total Topics:
7.379
Total Members:
3.709
Tutorials
:
56
Resources
:
143
Designs
:
220
Latest Member:
nicesurf
32 Guests, 4 Users online :
Yahoo crawler
,
Googlebot
,
Msnbot
,
nicesurf
11 users online today:
nicesurf
,
niky
,
Nikolas
,
GiorgosK
,
Vilice
,
Paradroid
,
FortuneBeach
,
designer
,
YMC
,
matthemattrix
,
TryUsOut
Recent topics
Re: Looking to Buy a Websit...
Your Thoughts on Forum SEO...
How To Mask URL?
Learning HTML+CSS
hi
Re: www.hiddenrate.com - ne...
Re: Yahoo Directory VS 8k D...
Re: Login with Example1.php...
HumanWorks Network
Technology news
Webmaster articles
Sublime web directory
RSS Feed directory and viewer
Readers
Web Design Gallery
·
Whois Lookup
·
Pagerank
·
Tag Browsing
·
Lo-fi version
·
Syndication
·
Webmaster forum history
·
Advertise
Developed by
HumanWorks
© 2005 - 2008
Webdigity webmaster community
·
sublime directory
Webdigity Webmaster Forums | Powered by
SMF 1.0.12
. © 2001-2005,
Lewis Media
. All Rights Reserved.