© Copyright 2016, Fred McClurg All Rights Reserved

Slides:



Advertisements
Similar presentations
/3024/ SUN MON TUE WED THU FRI SAT JANUARY 2011 February 2011 SMTWTFS
Advertisements

Arrays “Array, I'm bound array, 'cross the wide Missouri.” ‒ Old Programmer’s Folk Song © Copyright 2014, Fred McClurg All Rights Reserved.
Comments Introduction to JavaScript © Copyright 2016, Fred McClurg All Rights Reserved.
5 Day Forecast Mon Tues Wed Thu Fri.
FK International School First Term(2017/2018)School Calendar
…your name….
Variable Scope Variable, variable, who’s got the variable?
JavaScript Arrays Date
Personal Success Tracker
GANTT CHARTS Example Example Example Example text Tasks Example 1
Mon – 2Tue – 3Wed – 4Thu - 5Fri - 6Sat - 7Sun - 8 Mon – 9Tue – 10Wed – 11Thu - 12Fri – 13Sat – 14Sun -15 Mon – 16Tue – 17Wed – 18Thu - 19Fri – 20Sat –
Time Revision.
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER


Fun with dates and calendars

November 2011 November 2011 Name: __________________________
MON TUE WED THU
Insert Client Logo here with Client Project Name
Fun with dates and calendars
1   1.テキストの入れ替え テキストを自由に入れ替えることができます。 フチなし全面印刷がおすすめです。 印刷のポイント.
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER
Logo Calendar – January 2012 TO DO LIST 01/04/2012 Example TO DO LIST
January MON TUE WED THU FRI SAT SUN
January MON TUE WED THU FRI SAT SUN
2017 Jan Sun Mon Tue Wed Thu Fri Sat

ANNUAL CALENDAR HOLIDAYS JANUARY FEBRUARY MARCH APRIL MAY JUNE
HOLIDAYS ANNUAL CALENDAR JANUARY FEBRUARY MARCH APRIL MAY JUNE

January Sun Mon Tue Wed Thu Fri Sat
January MON TUE WED THU FRI SAT SUN
January MON TUE WED THU FRI SAT SUN

Jan Sun Mon Tue Wed Thu Fri Sat
HOLIDAYS ANNUAL CALENDAR JANUARY FEBRUARY MARCH APRIL MAY JUNE
2008 Calendar.
S M T W F S M T W F
January MON TUE WED THU FRI SAT SUN
Sun Mon Tue Wed Thu Fri Sat
1 - January - Sun Mon The Wed Thu Fri Sat
2 0 X X s c h e d u l e 1 MON TUE WED THU JANUARY 20XX FRI SAT SUN MEMO.
January MON TUE WED THU FRI SAT SUN
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
Calendar
Calendar – 2010 (October, November & December)
Calendar.
January MON TUE WED THU FRI SAT SUN
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat
Name: ______________________________

1/○~1/○ weekly schedule MON TUE WED THU FRI SAT SUN MEMO
January MON TUE WED THU FRI SAT SUN
S M T W F S M T W F
2016 | 10 OCT SUN MON TUE WED THU FRI SAT
Sun Mon Tue Wed Thu Fri Sat
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
WEB PAGES: Tables Welcome Back !.

TIMELINE NAME OF PROJECT Today 2016 Jan Feb Mar Apr May Jun
1 January 2018 Sun Mon Tue Wed Thu Fri Sat

1 January MON TUE WED THU FRI SAT SUN MEMO 2 February MON TUE WED THU FRI SAT SUN.
2008 Calendar.
S M T W F S M T W F
S M T W F S M T W F
1 January MON TUE WED THU FRI SAT SUN MEMO 2 February MON TUE WED THU FRI SAT SUN.
Presentation transcript:

© Copyright 2016, Fred McClurg All Rights Reserved Dates 8/27/2018 Dates “Bad dates.” ‒ Sallah (John Rhys-Davies), Raiders of the Lost Ark (1981) © Copyright 2016, Fred McClurg All Rights Reserved Introduction to JavaScript

Setting Today’s Date What is a Date? Dates in JavaScript are objects. Example: // set to current date/time var today = new Date(); console.log( today ); dateSetToday.html

Setting Date via Arguments How do I set a specific date? A date can be set via multiple arguments. Examples: var year = 1941; var month = 12 - 1; // 0=january var day = 7; var hour = 7; var minute = 48; // set to December 7, 1941 7:48 am var pearlHarbor = new Date( year, month, day, hour, minute ); console.log( pearlHarbor ); dateSetArgs.html

Setting Date via String Dates 8/27/2018 Setting Date via String Can I set a date with a string? Dates can also be set via a string. Examples: var dateStr = "December 7, 1941 7:48"; var pearlHarbor = new Date( dateStr ); console.log( pearlHarbor ); dateSetStr.html Introduction to JavaScript

Getting Date Values What is a Date? The date object has a number of methods for retrieving values. Examples: // set to current date/time var today = new Date(); console.log( today ); today.getFullYear(); // YYYY today.getMonth(); // 0-11 0=january today.getDate(); // 1-31 day of month today.getDay(); // 0-6 dow 0=sun today.getHours(); // 0-23 today.getTime(); // ms since 1/1/1970 dateMethods.html

Day of Week Calculator var dobStr = prompt( "Enter birthdate: (no dashes)", "December 7, 1941" ); // default // convert string to date object var dobObj = new Date( dobStr ); // calculate day of week var dowNum = dobObj.getDay(); // 0-6 day of week 0=Sun // create day of week array var dowStr = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ]; // create message var msg = "Born on: " + dowStr[ dowNum ]; alert( msg ); dateDowPrompt.html