mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 12:49:54 +05:00
added *end_month to ParseDate function
This commit is contained in:
@@ -193,6 +193,8 @@ func ParseDate(date string) (expDate time.Time, err error) {
|
||||
expDate = time.Now().AddDate(0, 1, 0) // add one month
|
||||
case date == "*yearly":
|
||||
expDate = time.Now().AddDate(1, 0, 0) // add one year
|
||||
case date == "*end_month":
|
||||
expDate = GetEndOfMonth(time.Now())
|
||||
case strings.HasSuffix(date, "Z"):
|
||||
expDate, err = time.Parse(time.RFC3339, date)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user