timeboss 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/PERIOD_SPECIFIERS.md +70 -0
- data/README.md +1 -1
- data/lib/tasks/calendars.rake +1 -0
- data/lib/timeboss/calendar/waypoints/absolute.rb +1 -0
- data/lib/timeboss/version.rb +1 -1
- data/lib/timeboss.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17c22a99ae9b02ecc3f435e99622a075c0a26af2d15f87070aefb1e6c0deb1c4
|
4
|
+
data.tar.gz: 774b9250575112756f30f9522bd98b36ed017a010cace574407a88b4f3316f98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 949de3a932fe24a8c34e8bf9ba89eed605ff6f8148ab5763600a6fb6ec00b822cfc2425b4aebce6982ecc62be43fb037723a264a6543539e626755dc39f1ec04
|
7
|
+
data.tar.gz: ac0312302c3e89d193bf16354ccf3593e3bed79e6e569b1580d78f82ad40bf663765f950078c86572d3e245f265047b947dbe70c1948b82bb958b205a73542af
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# TimeBoss Period Specifiers
|
2
|
+
Below is a list of examples for TimeBoss period specifiers. This list is by no means comprehensive, but hopefully serves as a guide to help
|
3
|
+
you understand how to communicate with TimeBoss.
|
4
|
+
|
5
|
+
All specifiers are resolved within the context of the utilized calendar (Gregorian, Broadcast, etc).
|
6
|
+
|
7
|
+
## Absolute Periods
|
8
|
+
An "absolute" period is one that never changes, regardless of the current date. "December of 2019" always references the same time period,
|
9
|
+
regardless of what today is.
|
10
|
+
|
11
|
+
_Assuming the Broadcast calendar is in use:_
|
12
|
+
| Specifier | Description | Resolution |
|
13
|
+
| -------------------------- | ----------------------------------- | ----------------------- |
|
14
|
+
| `2020Q3` | 3rd quarter of 2020 | 6/29/2020 - 9/27/2020 |
|
15
|
+
| `2022M1` | 1st month of 2022 | 12/27/2021 - 1/30/2022 |
|
16
|
+
| `2021H1M2` | 2nd month of the first half of 2021 | 2/1/2021 - 2/28/2021 |
|
17
|
+
| `2020W40` | 40th week of 2020 | 9/28/2020 - 10/4/2020 |
|
18
|
+
| `2027` | 2027 | 12/28/2026 - 12/26/2027 |
|
19
|
+
| `1999-07-31` or `19990731` | July 31, 1999 | 7/31/1999 - 7/31/1999 |
|
20
|
+
|
21
|
+
The sub-identifiers for period granularities are:
|
22
|
+
- `D`: day
|
23
|
+
- `W`: week
|
24
|
+
- `M`: month
|
25
|
+
- `Q`: quarter
|
26
|
+
- `H`: half
|
27
|
+
|
28
|
+
## Relative Periods
|
29
|
+
A "relative" period is one that changes based on the current date. "Last week" means something different today than it will a month from now.
|
30
|
+
|
31
|
+
_Assuming today is April 29, 2022, in the Gregorian calendar:_
|
32
|
+
| Specifier | Description | Resolution |
|
33
|
+
| --------------- | ----------------------------------- | --------------------- |
|
34
|
+
| `last_month` | March 2022 | 3/1/2022 - 3/31/2022 |
|
35
|
+
| `this_month-2` | February 2022 | 2/1/2022 - 2/28/2022 |
|
36
|
+
| `this_week` | Week of April 25, 2022 | 4/25/2022 - 5/1/2022 |
|
37
|
+
| `yesterday` | April 28, 2022 | 4/28/2022 - 4/28/2022 |
|
38
|
+
| `today+4` | May 3, 2022 | 5/3/2022 - 5/3/2022 |
|
39
|
+
| `next_year` | 2023 | 1/1/2023 - 12/31/2023 |
|
40
|
+
|
41
|
+
The relative prefixes can be used in conjuction with any period granularity. The terms here should be joined with the underscore (`_`) character as in the examples above.
|
42
|
+
|
43
|
+
Relative prefixes are:
|
44
|
+
- `last`
|
45
|
+
- `this`
|
46
|
+
- `next`
|
47
|
+
|
48
|
+
Period granularities are:
|
49
|
+
- `day`
|
50
|
+
- `week`
|
51
|
+
- `month`
|
52
|
+
- `quarter`
|
53
|
+
- `half`
|
54
|
+
- `year`
|
55
|
+
|
56
|
+
Accepted single-day specifiers:
|
57
|
+
- `yesterday`
|
58
|
+
- `today`
|
59
|
+
- `tomorrow`
|
60
|
+
|
61
|
+
## Compound Periods
|
62
|
+
Absolute and/or relative periods can be combined together to build "compound" periods by utilizing TimeBoss' "range" operator (`..`):
|
63
|
+
|
64
|
+
_Assuming today is April 29, 2022, in the Gregorian calendar:_
|
65
|
+
| Specifier | Description | Resolution |
|
66
|
+
| -------------------------- | ------------------------------------------------------------------------ | --------------------- |
|
67
|
+
| `yesterday..today` | Yesterday and Today | 4/28/2022 - 4/29/2022 |
|
68
|
+
| `last_quarter..this_month` | From the first day of last quarter, through the end of the current month | 1/1/2022 - 4/30/2022 |
|
69
|
+
| `this_week-2..next_week` | From the first day of 2 weeks ago, through the last day of next week | 4/11/2022 - 5/8/2022 |
|
70
|
+
| `2022M2..this_year` | From the first day of February, through the last day of this year | 2/1/2022 - 12/31/2022 |
|
data/README.md
CHANGED
data/lib/tasks/calendars.rake
CHANGED
data/lib/timeboss/version.rb
CHANGED
data/lib/timeboss.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timeboss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McDonald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- CODE_OF_CONDUCT.md
|
185
185
|
- Gemfile
|
186
186
|
- LICENSE.txt
|
187
|
+
- PERIOD_SPECIFIERS.md
|
187
188
|
- README.md
|
188
189
|
- Rakefile
|
189
190
|
- bin/tbsh
|