diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 00000000..bf3da472 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,760 @@ +# ======================================== +# CORE RULES - CRITICAL +# ======================================== + + +## 1. TDD Methodology (CRITICAL) + + +**MUST read and follow `src/.cursor/agents/doc/tdd.md` as the core guideline before performing any work.** + + +- **Strictly follow TDD cycle**: Red → Green → Refactor + + +- **Red Phase**: Write the simplest failing test first + + +- **Green Phase**: Implement only minimal code to pass tests + + +- **Refactor Phase**: Refactor only after tests pass + 햐 + +- **Tidy First Principle**: Separate structural changes from behavioral changes + + +- **Commit Rule**: Commit only when all tests pass + + +## 2. Documentation & History + + +Automatically execute the following rules for each conversation: + + +1. Answer user's question + + +2. **Save based on conversation type**: + + + **A. Review Request** (when user says "리뷰해"): + + - Save to `src/.cursor/agents/review/` folder ONLY (DO NOT save to history folder) + + - File naming: `YYYY-MM-DD_task-description.md` + + - Example: `2025-10-29_overlap-dialog-bug-fix.md` + + - Content: Formal code review report with Manager role + + + **B. Request Document Creation** (when user says "작성해" and Planner creates PRD): + + - Save to `src/.cursor/agents/request/` folder ONLY (DO NOT save to history folder) + + - File naming: `feature-name.md` (descriptive, kebab-case) + + - Example: `recurring-event-delete-single-or-all.md` + + - Content: PRD document using `prd.md` template + + - Reason: Request document itself is sufficient documentation + + + **C. Regular Conversation** (all other cases): + + - Save to `src/.cursor/agents/history/` folder with date-based folder structure + + - **Folder and file naming rule**: `MMDD/MMDD_i.md` (date-folder/month-day_sequence) + + - Example: October 27th first file → `1027/1027_1.md` + + - Same day additional files increment sequence: `1027/1027_2.md`, `1027/1027_3.md` + + - Each day starts from sequence 1 (resets when date changes) + + - **New date**: Automatically create new MMDD folder + + + **Auto-renumbering rule** (history folder only): When a history file is deleted, automatically renumber remaining files in that date folder + + - If `1028/1028_3.md` is deleted, renumber: `1028/1028_4.md` → `1028/1028_3.md`, `1028/1028_5.md` → `1028/1028_4.md` + + - **Purpose**: Maintain sequential numbering without gaps for better readability within each date folder + + - **Process**: List all files in date folder → Sort by sequence → Renumber starting from 1 + + - Example sequence after deletion: + + ``` + Before: 1028/1028_1.md, 1028/1028_2.md, 1028/1028_4.md, 1028/1028_5.md (3.md deleted) + After: 1028/1028_1.md, 1028/1028_2.md, 1028/1028_3.md, 1028/1028_4.md (renumbered) + ``` + +3. **File content format**: + + + **For history (regular conversation)**: + + ```markdown + 질문 (원본): + YYYY-MM-DD + + 질문: [사용자 질문] + + 답변: + [AI 답변] + ``` + + **For review (code review)**: + + ```markdown + # Code Review Report + + **Date**: YYYY-MM-DD + **Reviewer**: Manager (관리자) + **Reviewed By**: Worker (노동자) + **Task**: [Task description] + **PRD**: [PRD file path if applicable] + + ## Review Summary + [Comprehensive review content] + + ## Final Verdict + ✅ APPROVED / ⚠️ NEEDS REVISION / ❌ REJECTED + ``` + +## 3. Agent System & Roles + + +- **Role-based work**: Use role-specific files in `src/.cursor/agents/people/` folder systematically + + +- **Bilingual documentation rule**: Write `people/*.md` files in English, add Korean translation in HTML comments (``) immediately after each English title/sentence/bullet + + - Do not use prefixes like "한글 해석:" + + - Example: + + ```markdown + ## Role Definition + + ``` + +### 3.1 Agent Role Definitions + + +- **King (건물주)**: `src/.cursor/agents/people/king.md` + - Supreme commander who oversees and coordinates all agents + + +- **Feedback (관리자)**: `src/.cursor/agents/people/feedback.md` + - Quality manager who reviews work and ensures standards + + +- **Memory (세월이)**: `src/.cursor/agents/people/memory.md` + - Knowledge keeper who maintains historical context and learning + + +- **Planer (기획자)**: `src/.cursor/agents/people/planer.md` + - Project planner who creates detailed work plans + + +- **Tools (노동자)**: `src/.cursor/agents/people/tools.md` + - Worker who implements code and deliverables + + +# ======================================== +# WORKFLOW & EXECUTION ORDER +# ======================================== + + +## 3.2 Documentation Reading Order + + +When receiving a command from the user, follow this documentation reading order: + + +### Step 1: Basic Rules + +1. **Read `.cursorrules`** - Core guidelines and conventions + + +### Step 2: Role Assignment + +2. **Read assigned role file** in `src/.cursor/agents/people/` + + - King (건물주) → `king.md` + - Feedback (관리자) → `feedback.md` + - Memory (세월이) → `memory.md` + - Planer (기획자) → `planer.md` + - Tools (노동자) → `tools.md` + +### Step 3: Context Reference + +3. **Read context files** in `src/.cursor/agents/home/` + + - These files provide project-specific context and patterns + + +### Step 4: Guidelines Check + +4. **Check guideline files** in `src/.cursor/agents/doc/` + + - `tdd.md` - TDD methodology + + - `checklist.md` - Pre-commit checklist + + - `test-guidelines.md` - Test writing guidelines + + +### Step 5: Codebase Analysis + +5. **Analyze `src/` files** for patterns and structure + + - Understand existing code patterns + + - Identify architectural decisions + + +## 3.3 Work Execution Flow + + +### Command Processing Flow: + + +1. **User issues command** to King (건물주) + + - Command follows `.cursorrules` basic rules + + +2. **Agents analyze command** (Intent & Requirements) + + - All agents in `people/` folder participate in analysis + + - Understand user intent and requirements + + +3. **Pattern analysis** of entire `src/` files + + - Analyze existing codebase patterns + + - Reference `home/*.md` files for context + + +4. **Role-specific work assignment** + + - Each agent performs ONLY their assigned role + + - **Strict role separation for efficiency** + + +5. **Execute with guidelines** + + - Check `doc/` files during work + + - Follow TDD, checklist, and test guidelines + + +### Role Separation Rules (CRITICAL): + + +**Each agent does ONLY their assigned work. DO NOT cross roles.** + + +- ❌ Planer (기획자) MUST NOT do Tools (노동자) work + +- ❌ Planer (기획자) MUST NOT do Feedback (관리자) work + +- ❌ Tools (노동자) MUST NOT do Planer (기획자) work + +- ❌ Tools (노동자) MUST NOT do Feedback (관리자) work + + +**This role separation increases efficiency by:** + +- Clear responsibility boundaries + +- Specialized expertise application + +- Parallel work execution + +- Reduced context switching + + +# ======================================== +# CODE CONVENTIONS +# ======================================== + + +## 4. TypeScript Standards + + +### 4.1 Mandatory TypeScript Usage + + +- **All production code** must be written in TypeScript + + +- **All test code** must also be written in TypeScript + + +- Type definitions must be clear and specific + + +- Avoid `any` type (if unavoidable, explain with comments) + + +### 4.2 Function Naming Convention + + +**Rule**: Use camelCase + must be intuitive when translated to Korean + + +**Good Examples** (✅): +```typescript +// "Get user data" +// "사용자 데이터를 가져온다" +function getUserData() { } + +// "Create event" +// "이벤트를 생성한다" +function createEvent() { } + +// "Validate time range" +// "시간 범위를 검증한다" +function validateTimeRange() { } + +// "Send notification" +// "알림을 전송한다" +function sendNotification() { } + +// "Check overlap" +// "오버랩을 확인한다" +function checkOverlap() { } +``` + +**Bad Examples** (❌): +```typescript +function getData() { } // ❌ Too vague (What data?) + // ❌ 너무 모호함 (무슨 데이터?) + +function handle() { } // ❌ Unclear what to handle + // ❌ 무엇을 handle하는지 불명확 + +function process() { } // ❌ Unclear what to process + // ❌ 무엇을 process하는지 불명확 + +function do() { } // ❌ Meaningless + // ❌ 의미 없음 + +function x() { } // ❌ Cannot convey meaning + // ❌ 의미 전달 불가 +``` + +**Naming Guidelines**: + + +1. **Use verb + noun combination** + + - `getUser`, `createEvent`, `updateData`, `deleteItem` + +2. **Verify naturalness when translated to Korean** + + - `getUserProfile` → "Get user profile" / "사용자 프로필을 가져온다" ✅ + - `fetchHolidays` → "Fetch holidays" / "공휴일을 가져온다" ✅ + - `calculateTotal` → "Calculate total" / "합계를 계산한다" ✅ + +3. **Boolean functions start with `is`, `has`, `should`, `can`** + + - `isValid`, `hasPermission`, `shouldUpdate`, `canDelete` + +4. **Event handlers use `handle` or `on` prefix** + + - `handleClick`, `onSubmit`, `handleInputChange` + +### 4.3 CSS Class Naming Convention + + +**Rule**: Use snake_case (underscore) + selectable by double-click + + +**Structure**: `section_number_element_type` + + +**Good Examples** (✅): +```css +.section_1_title { } +.section_1_text { } +.section_1_flex_box { } +.section_2_button { } +.section_2_input_field { } +.header_nav_menu { } +.footer_social_icons { } +.modal_close_button { } +.card_image_container { } +.form_error_message { } +``` + +**Bad Examples** (❌): +```css +.section1Title { } // ❌ camelCase (only part selected on double-click) + // ❌ camelCase (더블 클릭 시 일부만 선택됨) + +.section-1-title { } // ❌ kebab-case (only part selected on double-click) + // ❌ kebab-case (더블 클릭 시 일부만 선택됨) + +.s1t { } // ❌ Unclear meaning + // ❌ 의미 불명확 + +.title { } // ❌ Too general + // ❌ 너무 일반적 + +.box1 { } // ❌ Cannot convey meaning + // ❌ 의미 전달 불가 +``` + +**Why snake_case?** + + +```css +/* Double-click behavior comparison */ +/* 더블 클릭 동작 비교 */ + +/* ✅ snake_case: entire class selected */ +/* ✅ snake_case: 전체 선택됨 */ +.section_1_title { } +/* Double-click → "section_1_title" fully selected */ +/* 더블 클릭 → "section_1_title" 전체 선택 */ + +/* ❌ kebab-case: only part selected */ +/* ❌ kebab-case: 일부만 선택됨 */ +.section-1-title { } +/* Double-click → only "section" or "1" or "title" selected */ +/* 더블 클릭 → "section" 또는 "1" 또는 "title" 만 선택 */ + +/* ❌ camelCase: only part selected */ +/* ❌ camelCase: 일부만 선택됨 */ +.section1Title { } +/* Double-click → only "section" or "Title" selected */ +/* 더블 클릭 → "section" 또는 "Title" 만 선택 */ +``` + +**Class Naming Guidelines**: + + +1. **Reflect hierarchy** + + - `header_nav_menu_item` + - `footer_copyright_text` + - `modal_content_body` + +2. **Use prefix for states** + + - `is_active`, `is_disabled`, `is_loading` + - `has_error`, `has_value` + +3. **Use suffix for modifiers** + + - `button_primary`, `button_secondary` + - `text_large`, `text_small` + +4. **BEM style can be applied** + + - Block: `card` + - Element: `card_header`, `card_body`, `card_footer` + - Modifier: `card_featured`, `card_highlighted` + +## 5. Code Formatting (.prettierrc) + + +Follow `.prettierrc` rules when writing all code: + + +- **Single quotes**: `singleQuote: true` +- **Semicolons**: `semi: true` +- **2-space indentation**: `tabWidth: 2` +- **Trailing commas**: `trailingComma: 'es5'` +- **Arrow function parentheses**: `arrowParens: 'always'` +- **Line endings**: `endOfLine: 'lf'` (LF only, not CRLF) +- **Print width**: `printWidth: 100` + +## 6. Import Order + + +**Rule**: External libraries → blank line → internal modules + + +```typescript +// ✅ Good +import { useState } from 'react'; +import { Button } from '@mui/material'; +import { useSnackbar } from 'notistack'; + +import Modal from './components/Modal'; +import { useCalendarView } from './hooks/useCalendarView'; +import { Event } from './types'; + +// ❌ Bad +import { useState } from 'react'; + +import Modal from './components/Modal'; // No blank line between groups + // 그룹 간 빈 줄 없음 +import { Button } from '@mui/material'; // Wrong order + // 잘못된 순서 +``` + +# ======================================== +# VALIDATION PROCESS +# ======================================== + + +## 7. Rule Validation Checkpoints + + +### 7.1 Before Starting Work + + +**Required checks**: + + +1. **✅ Check TDD guide** + + - Read `src/.cursor/agents/doc/tdd.md` + + - Recall Red → Green → Refactor cycle + + +2. **✅ Check related documents** + + - `src/.cursor/agents/doc/checklist.md` - Pre-commit checklist + + - `src/.cursor/agents/doc/test-guidelines.md` - Test writing guide + + +3. **✅ Check role** + + - Check appropriate `people/*.md` file for the task + + - Understand role-specific responsibilities and processes + + +4. **✅ Recall code conventions** + + - Function naming: camelCase + intuitive Korean translation + + - Class naming: snake_case + double-click selectable + + - TypeScript mandatory usage + + +### 7.2 Before Finishing Work + + +**Required validation items**: + + +1. **✅ TypeScript validation** + + ```bash + npm run lint:tsc + ``` + - No type errors + + - Check `any` type usage + + - Verify type definitions are clear + + +2. **✅ Naming convention validation** + + - Verify all functions use camelCase + + - Check if function names are intuitive when translated to Korean + + - Verify all CSS classes use snake_case + + - Check if class names are fully selectable by double-click + + +3. **✅ Code formatting validation** + + ```bash + npm run lint:eslint + ``` + - Verify Prettier rules compliance + + - Check import order is correct + + - Verify LF line endings (not CRLF) + + +4. **✅ Test validation** + + ```bash + npm test -- --run + ``` + - All tests pass + + - Tests for new features completed + + - Check test coverage + + +5. **✅ TDD cycle completion check** + + - Red phase: Failing test written + + - Green phase: Minimal code to pass tests implemented + + - Refactor phase: Code improvement completed (tests still passing) + + +6. **✅ Documentation check** + + - History file saved (`history/MMDD_i.md`) + + - Add comments to complex logic + + - Add English comments + Korean translation comments + + +7. **✅ Pre-commit final check** + + ```bash + # Check CRLF + # CRLF 확인 + git diff --check + + # Full lint + # 전체 린트 + npm run lint + + # Full test + # 전체 테스트 + npm test -- --run + ``` + +### 7.3 Validation Checklist Summary + + +**Before starting work**: + +- [ ] Read TDD guide + +- [ ] Check related documents + +- [ ] Check role file + +- [ ] Recall code conventions + + +**After finishing work**: + +- [ ] TypeScript validation (`npm run lint:tsc`) + +- [ ] Naming convention check (camelCase functions, snake_case classes) + +- [ ] Korean translation intuitiveness check + +- [ ] Code formatting validation (`npm run lint:eslint`) + +- [ ] Test pass (`npm test -- --run`) + +- [ ] TDD cycle completion check + +- [ ] Documentation completed + +- [ ] Pre-commit final check (`git diff --check`, `npm run lint`) + + +# ======================================== +# ADDITIONAL RULES +# ======================================== + + +## 8. Language & Communication + + +1. **Korean question handling**: When user asks in Korean, AI automatically translates to English to understand and provides answer in Korean + + +2. **Code comments**: Add Korean translation in HTML comments to English comments + + +## 9. File Organization + + +- **Test file location**: + + - Unit tests (utils/functions): `src/__tests__/unit/*.spec.ts` + - Hook tests: `src/__tests__/hooks/*.spec.ts` + - Component tests: `src/__tests__/components/*.spec.tsx` + - Integration tests: `src/__tests__/*.spec.tsx` + +- **Test file naming convention**: + + - DO NOT use `easy.` or `medium.` prefixes when creating new test files + + - Use descriptive names directly (e.g., `dateUtils.spec.ts`, not `easy.dateUtils.spec.ts`) + + - Existing files with prefixes should remain unchanged + + +- **Documentation location**: + + - Guides: `src/.cursor/agents/doc/` + + - Role definitions: `src/.cursor/agents/people/` + + - History: `src/.cursor/agents/history/` + + +# ======================================== +# QUICK REFERENCE +# ======================================== + + +## Function Naming Checklist + +- [ ] Using camelCase? + +- [ ] Verb + noun combination? + +- [ ] Natural when translated to Korean? + +- [ ] Boolean functions start with `is`/`has`/`can`/`should`? + + +## Class Naming Checklist + +- [ ] Using snake_case? + +- [ ] Fully selectable by double-click? + +- [ ] Clear meaning? + +- [ ] Reflects hierarchy? + + +## Pre-Commit Checklist + +```bash +git diff --check # Check CRLF + # CRLF 확인 +npm run lint:tsc # TypeScript validation + # TypeScript 검증 +npm run lint:eslint # ESLint validation + # ESLint 검증 +npm test -- --run # Run all tests + # 모든 테스트 실행 +npm run lint:eslint -- --fix # Auto-fix + # 자동 수정 +``` + +--- + +**These rules must be validated at the start and end of every task.** + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1f6001a9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,27 @@ +# Auto-detect text files and normalize line endings to LF +* text=auto eol=lf + +# Explicitly declare text files with LF +*.ts text eol=lf +*.tsx text eol=lf +*.js text eol=lf +*.jsx text eol=lf +*.json text eol=lf +*.md text eol=lf +*.html text eol=lf +*.css text eol=lf +*.scss text eol=lf +*.yml text eol=lf +*.yaml text eol=lf + +# Denote binary files +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary + diff --git a/server.js b/server.js index cac56df9..3171ceb5 100644 --- a/server.js +++ b/server.js @@ -44,7 +44,10 @@ app.put('/api/events/:id', async (req, res) => { const eventIndex = events.events.findIndex((event) => event.id === id); if (eventIndex > -1) { const newEvents = [...events.events]; - newEvents[eventIndex] = { ...events.events[eventIndex], ...req.body }; + // Preserve the original ID from URL params (don't let req.body override it) + // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars + const { id: _bodyId, ...bodyWithoutId } = req.body; + newEvents[eventIndex] = { ...events.events[eventIndex], ...bodyWithoutId, id }; fs.writeFileSync( `${__dirname}/src/__mocks__/response/${dbName}`, @@ -53,7 +56,7 @@ app.put('/api/events/:id', async (req, res) => { }) ); - res.json(events.events[eventIndex]); + res.json(newEvents[eventIndex]); // Return updated event, not old one } else { res.status(404).send('Event not found'); } diff --git a/src/.cursor/agents/company/feature-team.md b/src/.cursor/agents/company/feature-team.md new file mode 100644 index 00000000..7012b846 --- /dev/null +++ b/src/.cursor/agents/company/feature-team.md @@ -0,0 +1,438 @@ +# Feature Team Member - 기능팀원 (Feature Specialist) + + +**name:** 기능팀원 + + +**role:** functional code specialist + + +**description:** Specialized team member who assists Worker by creating functional functions. Focuses on writing clean, maintainable code that follows established patterns and solves specific problems. + + +--- + +# Function Creation Guidelines + + +## What is a Functional Function? + +A functional function is a **pure function** that takes input, processes it, and returns output without side effects. It should be: + +- **Single Responsibility**: Does one thing well + +- **Predictable**: Same input → same output + +- **Testable**: Easy to write unit tests + +- **Reusable**: Can be used in multiple places + + +## Reference Materials + +- **Existing Utils**: `src/utils/*.ts` - Learn from existing function patterns + +- **Memory Home**: `memoryHome.md` - Code patterns and data structures + +- **Worker Home**: `toolsHome.md` - Code conventions and standards + + +--- + +# How Functions Are Created + + +## Step 1: Identify the Need + +- Where is this function needed? + +- What problem does it solve? + +- Is there an existing function that does this? + + +## Step 2: Design the Function + +- Define inputs (parameters) + +- Define output (return value) + +- Name it clearly (camelCase + intuitive Korean translation) + + +## Step 3: Write with TDD + +1. **Red**: Write failing test first + +2. **Green**: Write minimal code to pass + +3. **Refactor**: Improve code quality + + +## Step 4: Document Usage + +- Add JSDoc comments + +- Provide examples + + +--- + +# Why Functions Are Created + + +## ✅ Good Reasons + + +1. **Code Reuse**: Logic used in multiple places + + +2. **Readability**: Complex logic → descriptive function name + + +3. **Testability**: Isolate logic for testing + + +4. **Maintainability**: Single source of truth + + +## ❌ Bad Reasons + + +1. **Premature Abstraction**: Used only once + + +2. **Unclear Purpose**: Function does too many things + + +3. **Poor Naming**: Name doesn't explain what it does + + +--- + +# Example: Creating a Date Utility Function + + +## ❌ Bad Example + + +```typescript +// ❌ 문제점: 이름 불명확, 여러 책임, 타입 없음, 주석 없음 +function process(y, m) { + if (m === 2) { + if ((y % 4 === 0 && y % 100 !== 0) || y % 400 === 0) { + return 29; + } + return 28; + } + if ([1, 3, 5, 7, 8, 10, 12].includes(m)) { + return 31; + } + return 30; +} +``` + +**문제점**: +- 함수 이름이 불명확 (`process`는 무엇을 하는가?) +- 매개변수 이름이 너무 짧음 (`y`, `m`은 무엇?) +- 타입 정의 없음 +- 주석 없음 +- 윤년 계산 로직이 함수에 섞여 있음 (단일 책임 위반) + +## ✅ Good Example + + +```typescript +/** + * Get the number of days in a specific month + * 특정 월의 일수를 가져옵니다 + * + * @param year - The year (e.g., 2024) + * @param month - The month (1-12) + * @returns The number of days in the month + * + * @example + * getDaysInMonth(2024, 2); // 29 (윤년) + * getDaysInMonth(2023, 2); // 28 (평년) + * getDaysInMonth(2024, 4); // 30 + */ +export function getDaysInMonth(year: number, month: number): number { + return new Date(year, month, 0).getDate(); +} + +/** + * Check if a year is a leap year + * 윤년인지 확인합니다 + * + * @param year - The year to check + * @returns true if leap year, false otherwise + */ +export function isLeapYear(year: number): boolean { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; +} +``` + +**장점**: +- ✅ 명확한 함수 이름 (camelCase + 직관적) +- ✅ 설명적인 매개변수 이름 +- ✅ TypeScript 타입 정의 +- ✅ JSDoc 주석 (영어 + 한국어) +- ✅ 사용 예시 제공 +- ✅ 단일 책임 (getDaysInMonth는 일수만, isLeapYear는 윤년 확인만) +- ✅ 네이티브 API 활용 (new Date) + +--- + +# Where Functions Are Used + + +## Usage Locations + + +### 1. Utils (`src/utils/`) + +Pure functions that don't depend on React or external state + + +**Example**: `getDaysInMonth()` in `dateUtils.ts` + + +**Used in**: + +- `useCalendarView` hook - Generate calendar grid +- `useEventOperations` hook - Validate event dates + +### 2. Hooks (`src/hooks/`) + +Functions that use React hooks or manage state + + +**Example**: `useCalendarView()` + + +**Used in**: + +- `App.tsx` - Main calendar component + +### 3. Components (`src/components/`) + +UI components that render visual elements + + +**Example**: `Modal` component + + +**Used in**: + +- `App.tsx` - Event creation/edit modal +- `App.tsx` - Notification settings modal + +### 4. APIs (`src/apis/`) + +Functions that communicate with external services + + +**Example**: `fetchHolidays()` + + +**Used in**: + +- `useCalendarView` hook - Load holiday data + +--- + +# Example: Function Usage Flow + + +## ❌ Bad: Inline Logic (인라인 로직) + + +```typescript +// ❌ App.tsx - 로직이 컴포넌트에 직접 들어가 있음 +function App() { + const [currentDate, setCurrentDate] = useState(new Date()); + + // 날짜 계산 로직이 여기 있음 (재사용 불가, 테스트 어려움) + const daysInMonth = new Date( + currentDate.getFullYear(), + currentDate.getMonth() + 1, + 0 + ).getDate(); + + return