function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
suresh.csksuresh.csk 

used yyyy as YYYY shows different year from 2014 to 2015

Hi.

In the VF I used the date format as YYYY-MM-dd in the 
<apex:outputText value="{0,date,YYYY/MM/dd}">
Before the last week of the year it was OK. When the new year falls in the  last week of Decemeber comes the issue.
For example
2014:
S   M  T  W Th F Sat
28 29 30 31 1   2 3

In the above calendar 1st Jan of 2015 falls in the Thurusday.So when I viewd the records of 28,29,30 of December 2014 It showed as
2015-12-28
2015-12-29
2015-12-30
2015-12-31

After that I came to know that
@"YYYY" is week-based calendar year.
@"yyyy" is ordinary calendar year.
http://realmacsoftware.com/blog/working-with-date-and-time

cheers
suresh



 
PratikPratik (Salesforce Developers) 
Thanks for sharing Suresh.

Thanks,
Pratik
Vidya DVidya D
Thanks for sharing
Ankit AroraAnkit Arora
I don't see this as a problem, these boards are to get the solutions to your problems. I do appreciate your sharing here, but it would be more great if you share this on your blogs/FB/Twitter etc..
Sameer PrasonnSameer Prasonn
I believe this effort must be appriciated. thank you for sharing 
SipuSipu
Thanks for your effort
ShailendraTiwariShailendraTiwari
Hi 
If you use value in apex_param then i think It's helpful.
<apex:outputText value="{0,date,MMMM dd, yyyy}"><apex:param value="{!item.eventstartDate}" /></apex:outputText>
Timothy MendisTimothy Mendis
I am facing the similar problem with my website (https://www.toptvtricks.com/best-fire-stick-apps/)