diff --git a/CHANGELOG.md b/CHANGELOG.md index 77291a80..76ca0101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ see [CONTRIBUTING.md](CONTRIBUTING.md#release-instructions-for-a-new-version) fo [#360](https://github.com/lunarmodules/Penlight/pull/360) - deprecate: `permute.table`, renamed to `permute.order_table` (removal later) [#360](https://github.com/lunarmodules/Penlight/pull/360) + - deprecate: `Date` module (removal later) + [#367](https://github.com/lunarmodules/Penlight/pull/367) - feat: `permute.list_iter` to iterate over different sets of values [#360](https://github.com/lunarmodules/Penlight/pull/360) - feat: `permute.list_table` generate table with different sets of values diff --git a/docs_topics/05-dates.md b/docs_topics/05-dates.md index c2431cfd..32c42f77 100644 --- a/docs_topics/05-dates.md +++ b/docs_topics/05-dates.md @@ -2,6 +2,8 @@ +NOTE: the Date module is deprecated + ### Creating and Displaying Dates The `Date` class provides a simplified way to work with [date and diff --git a/lua/pl/Date.lua b/lua/pl/Date.lua index 9c878d67..039dbaf7 100644 --- a/lua/pl/Date.lua +++ b/lua/pl/Date.lua @@ -1,6 +1,9 @@ --- Date and Date Format classes. -- See @{05-dates.md|the Guide}. -- +-- NOTE: the date module is deprecated! see +-- https://github.com/lunarmodules/Penlight/issues/285 +-- -- Dependencies: `pl.class`, `pl.stringx`, `pl.utils` -- @classmod pl.Date -- @pragma nostrip @@ -11,6 +14,15 @@ local stringx = require 'pl.stringx' local utils = require 'pl.utils' local assert_arg,assert_string = utils.assert_arg,utils.assert_string + +utils.raise_deprecation { + source = "Penlight " .. utils._VERSION, + message = "the 'Date' module is deprecated, see https://github.com/lunarmodules/Penlight/issues/285", + version_removed = "2.0.0", + version_deprecated = "1.9.2", +} + + local Date = class() Date.Format = class()