Skip to content

PREVIOUS_MONTHNAME implementation not robust #126

@nextensible

Description

@nextensible

https://github.com/jperelli/Redmine-Periodic-Task/blob/fa4ee5ecc96914d4348697e6b507f8cb09fc3e6e/app/models/periodictask.rb#L83C63-L83C70

The PREVIOUS_MONTHNAME calculation simply substracts 30 days.
This leads to wrong resolutions, e.g. when the ticket is created on first of march (then it says "January", obviously)
I suppose, it wont work for other border cases as well (e.g. when run on 31st?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions