[ZBXNEXT-545] improved date() function Created: 2010 Oct 29  Updated: 2019 Apr 01

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: richlv Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: triggerfunctions
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

trigger (and elsewhere) function date() could be expanded. currently it only returns date in YYYYMMDD format, which does not allow, for example, easily comparing something like date()<14

ideally it would accept format specifiers in the parameters, not unlike 'date' commandline utility



 Comments   
Comment by richlv [ 2012 Aug 09 ]

what would date()<14 do ?
digging in my memory, that would be duplicated by dayofmonth(). have to think a bit what else might be useful

ok, so accepting format specifiers would be the goal

Comment by Jacco Mol [ 2019 Apr 01 ]

Im monitoring monthly payments and have an alert on a minimum of those. Subscriptions can be started on any date and are extended every month. But as February only has 29 (or 28) days, the next month (March) on the 30th and 31th there are very little payments. I would therefore like to not have this alert trigger on the last days of March. Currently there is no Monthofyear trigger function, I would like to suggest either adding that or implementing this very flexible date format function which would allow me to use date('MMDD')<>'0330'.

Generated at Sat Apr 20 11:17:15 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.