Skip to content

Commit 8505cb6

Browse files
committed
docs(ci): update workflow trigger and simplify homepage 📝
1 parent eed2832 commit 8505cb6

2 files changed

Lines changed: 7 additions & 36 deletions

File tree

.github/workflows/docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
paths:
88
- 'docs/**'
99
- '.github/workflows/docs.yml'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- 'docs/**'
1015
workflow_dispatch:
1116

1217
permissions:

docs/src/content/docs/index.mdx

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,6 @@ hero:
1616
variant: minimal
1717
---
1818

19-
## Quick Example
19+
## Why Daytime?
2020

21-
```typescript
22-
import daytime from '@neabyte/daytime'
23-
24-
// Create and format
25-
const date = daytime('2025-11-15T14:30:45Z')
26-
console.log(date.format('YYYY-MM-DD Do dddd'))
27-
// "2025-11-15 15th Saturday"
28-
29-
// Locale support
30-
console.log(date.locale('en').format('dddd, MMMM Do YYYY'))
31-
// "Saturday, November 15th 2025"
32-
33-
// Chain operations
34-
const result = date
35-
.add(3, 'month')
36-
.subtract(5, 'day')
37-
.startOf('week')
38-
.nextBusinessDay()
39-
.format('YYYY-MM-DD dddd')
40-
console.log(result)
41-
// "2026-02-09 Monday"
42-
```
43-
44-
## Installation
45-
46-
```bash
47-
# npm
48-
npm install @neabyte/daytime
49-
50-
# Deno
51-
deno add jsr:@neabyte/daytime
52-
53-
# CDN (browser)
54-
import daytime from 'https://esm.sh/@neabyte/daytime'
55-
```
21+
JavaScript's Date object is fine until you need to figure out if it's a business day, format it in French, or calculate the next Monday. Daytime tries to cover those cases—weekends, leap years, timezones, locales—so you don't have to. Chain methods together, format with tokens, and move on to the next thing on your list, because debugging date logic shouldn't take all day, and we've learned that the hard way.

0 commit comments

Comments
 (0)