[Asterisk-code-review] say.conf: fix 12pm noon logic (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Tue Dec 21 18:32:12 CST 2021


Attention is currently required from: N A, Benjamin Keith Ford.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17651 )

Change subject: say.conf: fix 12pm noon logic
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

File configs/samples/say.conf.sample:

https://gerrit.asterisk.org/c/asterisk/+/17651/comment/c429bb2a_a2194ba1 
PS1, Line 93:     _date:[I]:. => num:${IF($[${SAY:8:2} > 12] ? $[${SAY:8:2}%12] : ${SAY:8:2})}	; hour 0-12
> Hm. Maybe there's more wrong with this, then. […]
This should work. Hours range from 00 to 23, so to convert to 0 to 12 yeah first 13 (0-12) you want to be the actual numbers, then modulo works for any over 12 (>13).

Alternatively use modulo for all except when == 12. Not sure if that makes it more clear though. Whatcha have is fine.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17651
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie40f9618636eb4c483b449bd707a5dcffca5c406
Gerrit-Change-Number: 17651
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Benjamin Keith Ford <bford at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Benjamin Keith Ford <bford at digium.com>
Gerrit-Comment-Date: Wed, 22 Dec 2021 00:32:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Benjamin Keith Ford <bford at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211221/0007d472/attachment-0001.html>


More information about the asterisk-code-review mailing list