9̓R[hꗗ

LESSON 25 tƎɂĊwڂ

SECTION 2 ̃f[^

݂̓Zbg

function createDate() {
  const now = new Date();
  console.log(now);
}

œZbg

function createDateByString() {
  const eventDay = new Date('2025/04/13 14:00:00');
  console.log(eventDay);
}

lœZbg

function createDateByNumber() {
  const eventDay = new Date(2025, 03, 13, 14);
  console.log(eventDay);
}

SECTION 3@f[^ǂݏ

̓Zbgăf[^o

function readDate() {
  const d = new Date('2027/01/01 10:30:00');
  console.log(d.getMonth());
  console.log(d.getDate());
  console.log(d.getDay());
  console.log(d.getHours());
}

lœZbg

function writeDate() {
  const d = new Date('2027/01/01 10:30:00');
  d.setMonth(11);
  d.setMinutes(45);
  console.log(d);
}

SECTION 4@f[^vZ

f[^vZ

function calcDate() {
  const start = new Date('2026/05/05 20:00:00');
  const end = new Date(start);
  end.setHours(start.getHours() + 2);
  console.log(start);
  console.log(end);
}

LESSON 26@J_[擾悤

ftHgJ_[擾

function getMyCalendar() {
  const myCal = CalendarApp.getDefaultCalendar();
  console.log(`${myCal.getName()}擾ł`);
}

SECTION @3 IDŃJ_[擾

IDŃJ_[擾

function getOtherCalendar() {
  const id = 'ja.japanese#holiday@group.v.calendar.google.com';
  const otherCal = CalendarApp.getCalendarById(id);
  console.log(`${otherCal.getName()}擾ł`);
}

LESSON 27@J_[ɗ\悤

SECTION 1@\쐬悤

J_[ɗ\

function createMeeting() {
  const myCal = CalendarApp.getDefaultCalendar();
  const startTime = new Date('2026/05/05 10:00:00');
  const endTime = new Date('2026/05/05 12:00:00');
  const options = {
    location: '1c',
    description: 'AWF_FVĩRZvgA\ZmF'
  };
  myCal.createEvent('Vic', startTime, endTime, options);
}

J_[ɏI̗\

function createRestDay() {
  const myCal = CalendarApp.getDefaultCalendar();
  const targetDate = new Date('2026/05/06');
  const options = {
    location: '{ЁES'
  };
  myCal.createAllDayEvent('nLOCxg', targetDate, options);
}