-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix calls to last_month and next_month (#95)
* Fix calls to last_month macros * Add tests for last_month * Fix next_month and add tests
- Loading branch information
1 parent
7310f6b
commit 8474083
Showing
6 changed files
with
44 additions
and
10 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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{%- macro last_month_name(short=True, tz=None) -%} | ||
{{ dbt_date.month_name(dbt_date.last_month(1, tz), short=short) }} | ||
{{ dbt_date.month_name(dbt_date.last_month(tz), short=short) }} | ||
{%- endmacro -%} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{%- macro last_month_number(tz=None) -%} | ||
{{ dbt_date.date_part('month', dbt_date.last_month(1, tz)) }} | ||
{%- endmacro -%} | ||
{{ dbt_date.date_part('month', dbt_date.last_month(tz)) }} | ||
{%- endmacro -%} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{%- macro next_month_name(short=True, tz=None) -%} | ||
{{ dbt_date.month_name(dbt_date.next_month(1, tz), short=short) }} | ||
{%- endmacro -%} | ||
{{ dbt_date.month_name(dbt_date.next_month(tz), short=short) }} | ||
{%- endmacro -%} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{%- macro next_month_number(tz=None) -%} | ||
{{ dbt_date.date_part('month', dbt_date.next_month(1, tz)) }} | ||
{%- endmacro -%} | ||
{{ dbt_date.date_part('month', dbt_date.next_month(tz)) }} | ||
{%- endmacro -%} |