-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: managing focused work sessions (#35)
* feat: managing focused work sessions * chore: validate timezone
- Loading branch information
1 parent
1bab31d
commit 2d7f986
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Focus Time Manager. | ||
|
||
## Description | ||
|
||
The focusTimeManager function assists users in managing focused work sessions throughout their day. It provides a schedule with alternating focus and break sessions, which is particularly useful for productivity techniques like the Pomodoro Technique. | ||
|
||
## Note: | ||
|
||
It is similar to [Mental Health Manager](./mentalHealth.md) but it is more focused on work sessions. | ||
|
||
## Usage | ||
|
||
```javascript | ||
import { focusTimeManager } from 'world-clockify'; | ||
|
||
const preference = { | ||
workStartTime: '09:00', | ||
workEndTime: '17:00', | ||
preferredTimeZone: 'America/New_York', | ||
focusDuration: 50, | ||
shortBreakDuration: 10, | ||
}; | ||
|
||
const schedule = focusTimeManager(preference); | ||
|
||
console.log(schedule); | ||
``` | ||
|
||
## Expected Output | ||
|
||
```bash | ||
{ | ||
focusSessions: [ | ||
{ start: '09:00 am', end: '09:50 am' }, | ||
{ start: '10:00 am', end: '10:50 am' }, | ||
... | ||
], | ||
reminders: ['Time to focus!', 'Take a short break!', 'Focus time starts again soon!'] | ||
} | ||
|
||
``` | ||
## Parameters | ||
- focusUserPreferences(object): The date string in ISO format. | ||
## Returns | ||
- (object): As a result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters