Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

vinay049
vinay049
Offline
  • 03-11-2021
    David's answer helped me.

    Type

    Questions

    Views

    422

    Like

    1

    Replies

    1
  • 03-11-2021
    This worked. I noticed the difference and what was the issue. Thank you

    Type

    Questions

    Views

    423

    Like

    1

    Replies

    0
  • 18-10-2021
    Hi David, Thank you for the reply. Isn't it possible to do this without using any external libraries? I tried to use the following code, but it didn't work out: Last day of the month is: <% function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth(), 0).getDate(); } function ...

    Type

    Questions

    Views

    475

    Like

    1

    Replies

    2
  • 18-10-2021
    Hi Laurent, After using that snippet, I analyzed the delivery and it didn't have any error. But when I sent that email as proof, it didn't come out. I don''t now where I should check logs in such case. Also, similar thing happened with some other code in the past.

    Type

    Questions

    Views

    787

    Likes

    0

    Replies

    1
  • 18-10-2021
    Hi Kapil, Thank you for your reply. I have seen this video and this helped me understand how to use blocks. I'm having 2 different deliveries as per language preference so there isn't use of conditional statement. But I'm trying to figure out how to use JS specific code so that I could have month's ...

    Type

    Questions

    Views

    482

    Like

    1

    Replies

    0
  • 15-10-2021
    Thanks for providing the location for editing. After using that snippet, email didn't come through from ACM to inbox. Can you please let me know what might be the issue ?

    Type

    Questions

    Views

    800

    Likes

    0

    Replies

    3
  • 15-10-2021
    Thank you for revert.I used below mentioned approach but it didn't work out. Can you plz tell me why? Last day of the month is: <% function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth(), 0).getDate(); } function month_fr(today){ var options = { weekday: 'long', year: 'nu...

    Type

    Questions

    Views

    804

    Likes

    0

    Replies

    5
  • 14-10-2021
    Hi everyone, I'm rendering dynamic content using JavaScript and it is in English for one email delivery. I want to use same JavaScript for content that should be in another language. For example, I'm displaying month name dynamically in email subject as well as email body in English. I want to displ...

    Type

    Questions

    Views

    497

    Like

    1

    Replies

    9
  • 14-10-2021
    Another implementation way - just corrected snippet for month. Found that in JS, month is 0-based so it was creating the issue.<%function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth()+1, 0).getDate();}var today = new Date();%><%= daysInMonth(today) %> <%= formatDate (tod...

    Type

    Questions

    Views

    1.2K

    Likes

    0

    Replies

    0
  • 14-10-2021
    Hi Laurent, Also, the number of days for October is coming as "30" in place of "31" with this code. Do you know the reason ?

    Type

    Questions

    Views

    814

    Likes

    0

    Replies

    0
Top badges earned by vinay049
Customize the badges you want to showcase on your profile