Files
2nd/10_Wiki/Topics/Domain_Programming/Topic_JavaScript/JavaScript_Dates.md
T
Antigravity Agent c24165b8bc refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:05:56 +09:00

5.9 KiB
Raw Blame History

id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
id title category status verification_status canonical_id aliases duplicate_of source_trust_level confidence_score created_at updated_at review_reason merge_history tags raw_sources applied_in github_commit
javascript-dates JavaScript Dates Frontend draft conceptual
Date object
new Date
Date.now
date constructor
JS dates
B 0.89 2026-06-23 2026-06-23
javascript
js
web
frontend
w3schools
date
time
https://www.w3schools.com/js/js_dates.asp

JavaScript Dates

🎯 한 줄 통찰 (One-line insight)

JavaScript dates are created with new Date() in several argument forms (none, a date string, 27 numbers, or milliseconds since the 1970 epoch), and months are counted from 0 (January) to 11 (December). [S1]

🧠 핵심 개념 (Core concepts)

  • new Date() creates a date object with the current date and time. [S1]
  • new Date(date string) creates a date from a date string. [S1]
  • new Date(year, month, ...) creates a date from numeric components (year, month, day, hours, minutes, seconds, milliseconds). [S1]
  • new Date(milliseconds) creates a date as milliseconds since January 1, 1970 (the epoch / zero time). [S1]
  • Months are zero-indexed — January = 0, December = 11. [S1]
  • Date objects are static — the computer time is ticking, but the date object, once created, is not. [S1]

🧩 추출된 패턴 (Extracted patterns)

  • Nownew Date() for current date/time. [S1]
  • From componentsnew Date(year, month, day, ...), remembering month is 0-based. [S1]
  • From epoch msnew Date(ms); new Date(0) is the 1970 epoch. [S1]
  • Display conversionstoString, toDateString, toUTCString, toISOString. [S1]

📖 세부 내용 (Details)

Creating Date Objects — Date objects are created with the new Date() constructor. There are 4 ways to create a new date object: with no arguments, with a date string, with date arguments (numbers), or with milliseconds. [S1]

new Date() — creates a date object with the current date and time: [S1]

const d = new Date();

new Date(date string) — creates a date object from a date string: [S1]

const d = new Date("October 13, 2014 11:13:00");
const d = new Date("2022-03-25");

new Date(year, month, ...) — creates a date object with a specified date and time. 7 numbers specify year, month, day, hour, minute, second, and millisecond (in that order): [S1]

const d = new Date(2018, 11, 24, 10, 33, 30, 0);

6 numbers specify year, month, day, hour, minute, second: [S1]

const d = new Date(2018, 11, 24, 10, 33, 30);

5 numbers specify year, month, day, hour, and minute: [S1]

const d = new Date(2018, 11, 24, 10, 33);

4 numbers specify year, month, day, and hour: [S1]

const d = new Date(2018, 11, 24, 10);

3 numbers specify year, month, and day: [S1]

const d = new Date(2018, 11, 24);

2 numbers specify year and month: [S1]

const d = new Date(2018, 11);

Note: JavaScript counts months from 0 to 11: January = 0. December = 11. [S1]

new Date(milliseconds) — creates a new date object as zero time plus milliseconds. January 01 1970 plus 100 000 000 000 milliseconds is approximately March 03 1973: [S1]

const d = new Date(100000000000);

Negative milliseconds go before 1970: [S1]

const d = new Date(-100000000000);

One day (24 hours) in milliseconds: [S1]

const d = new Date(24 * 60 * 60 * 1000);
// or
const d = new Date(86400000);

Zero time is January 01 1970 00:00:00 UTC: [S1]

const d = new Date(0);

Displaying Dates — JavaScript will (by default) output dates using the toString() method, a string representation of the date including the time zone. Other conversions: [S1]

const d = new Date();
d.toString();
const d = new Date();
d.toDateString();
const d = new Date();
d.toUTCString();
const d = new Date();
d.toISOString();

🛠️ 적용 사례 (Applied in summary)

The page's own snippets are the canonical applied examples — creating "now", a date from a string, a date from 27 numeric components, dates from milliseconds (including new Date(0)), and converting to string formats. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Current date / from components / from epoch:

const now = new Date();
const dec24 = new Date(2018, 11, 24, 10, 33, 30);  // month 11 = December
const epoch = new Date(0);                          // Jan 01 1970 UTC

Display conversions:

const d = new Date();
d.toDateString();
d.toUTCString();
d.toISOString();

⚖️ 모순 및 업데이트 (Contradictions & updates)

No contradictions found in the source. The source emphasizes the zero-based month convention (January = 0) as a common point of confusion. [S1]

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.89
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-06-23: Initial draft synthesized from the W3Schools "JavaScript Dates" page (Astra wiki-curation, P-Reinforce v3.1 format).