Day of Week | JavaScriptSource

Day of Week

Alexei Kourbatov Dec 10, 2008


Use this script to calculate what day of the week a given date occurred. Can be used for past or future dates.


  • Created by: Alexei Kourbatov
  • Web Site: Linuxtopia
  • Posted: December 10, 2008

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: dayOfWeek.js


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response

(1 comment)

Great script, however being a newbie at this, I want to do the following: 1) Instead of requesting a date through a pop-up, I want to assign a date entered by a user, e.g. $user_date (same format as requested by the pop-up; and 2) I want to save the resulting day, that is wDay, in a variable called $text_day. I can't figure out how to do that. Any help would be greatly appreciated.

Wilfred Apr 1, 2015