Skip to content

Commit

Permalink
Added fit_origin function for various window start points (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
gryumov authored Jul 31, 2024
1 parent 2777483 commit 2d17c2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "TimeArrays"
uuid = "058eeebf-2231-41de-8410-62311c15f51e"
version = "1.1.0"
version = "1.1.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
6 changes: 1 addition & 5 deletions src/resample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ end
return typemin(T)
end

@inline function fit_origin(t_array::TimeArray{T,V}, ::Val{ORIGIN_OF_WINDOW}) where {T<:Date,V<:Any}
return trunc(ta_timestamp(t_array[begin]), Year)
end

@inline function fit_origin(t_array::TimeArray{T,V}, ::Val{ORIGIN_OF_WINDOW}) where {T<:DateTime,V<:Any}
@inline function fit_origin(t_array::TimeArray{T,V}, ::Val{ORIGIN_OF_WINDOW}) where {T<:TimeType,V<:Any}
return trunc(ta_timestamp(t_array[begin]), Year)
end

Expand Down

2 comments on commit 2d17c2b

@gryumov
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

Release notes:

  • Added fit_origin function for various window start points

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112137

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.1 -m "<description of version>" 2d17c2b8703b1ada169393cfbbe1aadacf339546
git push origin v1.1.1

Please sign in to comment.