[Vtigercrm-developers] Days / month names in expressions?

Rubén A. Estrada Orozco rulotec1 at gmail.com
Thu Dec 8 02:36:00 GMT 2022


Hi Chris,

How about:

$dt = new DateTime('2022-12-07');
echo $dt->format('F'); // output: "December"
echo $dt->format('l'); // output: "Wednesday"

Saludos

Rubén


On Wed, Dec 7, 2022 at 4:25 PM socialboostdk <socialboostdk at gmail.com>
wrote:

> Hi there,
>
> Has anyone any smart fixes for getting day & month names in expressions?
>
> If let's say I wanted to write an email saying "Happy Wednesday Chris,
> glad we're in December" based on todays date 2022-12-07. So I'd perhaps
> need something like getDayName(get_date('today')) and getMonthName(
> get_date('today')).
>
> I'm thinking this must be an issue that someone has come across before?
> I'd rather not do a VERY long IF/THEN structure to guess month names etc :)
>
> Thanks!
>
> Best
> Chris
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20221207/d0df60dc/attachment.html>


More information about the vtigercrm-developers mailing list