• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Getting the year

LEGEND ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

I am attempting to grab the current year from the server (Now()) and
returning only the year so I can set it to a variable.

I found Date.getYear(), but I heard bad cross browers issues
I found Date.getFullYear(), but don't know how to impliment it. I keep
getting that the method is not found.

Does anyone know a good way to return only the current year?

Thanks!


TOPICS
Advanced techniques

Views

241

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

Nevermind


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

Did you try using the year function? Details are in the cfml reference manual. If you don't have one, the internet does.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

LATEST
Yeah, I thought of that right after I hit the send button. I have it done
and it works fine. Thanks.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation