Could you try to explain what is wrong/needs changing and I will try my best, but the calendar display is not my code so can't promise success.نوشته شده توسط HuwR
tanx...
1. The calendar section is no problem 2. Global view Dates on all pages of the site are gregorian date, not solar (Hijri Shamsi or Jalali or Persian) date.
for example: and more I remember when you first tried this, you ran into a problem with the TimeAgo , and it was decided that we could choose optional the TimeAgo.
looks to me like it isn't loading one of the js files I will take a lookنوشته شده توسط HuwR
The lack of a solar calendar display is not related to the JavaScript file.
but related to the correct .NET support for this calendar.
Currently, displaying All Dates on pages is only a Persian translation of gregorian date... Not Persian date, only persian translation of date.
the calendar is a javascript plugin it is nothing to do with .net
Currently, displaying All Dates on pages is only a Persian translation of gregorian date... Not Persian date, only persian translation of date.
You will have to explain with examples since I know nothing about Persian dates. AFIK, this date 13/05/2020 should be shown as ۲۴ اردیبهشت ۱۳۹۹ is that not happening?
the calendar is a javascript plugin it is nothing to do with .net
Currently, displaying All Dates on pages is only a Persian translation of gregorian date... Not Persian date, only persian translation of date.
Yes, all Displayed dates except JavaScript calendar
You will have to explain with examples since I know nothing about Persian dates. AFIK, this date 13/05/2020 should be shown as ۲۴ اردیبهشت ۱۳۹۹ is that not happening?نوشته شده توسط HuwR
That's true...is not happening...
examples: Short format:Gregorian: 13/05/2020 should be shown as Persian: 1399/02/24
Persian short format only is yyyy/mm/dd Long format:Gregorian: 13 May 2020 11:29 should be shown as Persian: 24 اردیبهشت 1399 11:29End of .NET configuration ----------------------------------------------------------------------- next point:
for TimeAgo remember: https://www.reddick.co.uk/mvc/Topic/4846?pagenum=2&archived=0
The problem isn't timeago unfortunately, on my local server the date is correct without timeago:24 اردیبهشت 1399 11:29 but here it is showing as:13 مي 2020 09:20
bingo! I have it displaying the correct date now I think, looks like the server was not loading the calendar for some reason, so have added code to force it to load. can you confirm it is now correct and I will retry enabling timeago as I believe that will work now
The problem isn't timeago unfortunately, on my local server the date is correct without timeago:24 اردیبهشت 1399 11:29 but here it is showing as:13 مي 2020 09:20نوشته شده توسط HuwR
tanx ...
For now, let's skip the TimeAgo ..
.NET Short date is Ok...
But Long date?!!
I can't see example for Long Date
Seems to be still a server/calendar problem, it defaults to that format because the Persian calendar is unsupported, not sure why, I will do some more digging.
I'm going to move the date format strings to the language resource so they can be formatted better, should have an update later today.نوشته شده توسط HuwR
could you tell me what the date is in English and what it should be in Persian. unfortunately I don't know what they should be so am just taking a stab in the dark It may not even be possible to fix this on the server unfortunately, the persian calendar does not appear to give me month names just numbers
what should for example 13 May 2020 be in Persian ? just so I can test some dates.
We may need to put the months in as resource, I'll let you know how I get on. It is just difficult to test locally as the calendars behave completely differently and all works fine on my local server, so I suspect it is the server version here that is the issue
what should for example 13 May 2020 be in Persian ? just so I can test some dates.
We may need to put the months in as resource, I'll let you know how I get on. It is just difficult to test locally as the calendars behave completely differently and all works fine on my local server, so I suspect it is the server version here that is the issue نوشته شده توسط HuwR
1. 13 May 2020 ==== 24 اردیبهشت 13992. I think that the Persian calendar is present in the .NET Framework by default and is probably independent of the server calendar. But I don't know how to use it.
Everything is ok but one, just one step away from the rest of the items. And that is the name of the Persian months.
Unfortunately the problem is that on the server it is not in the normal list of supported calendars so you can't just use the normal formatting of .net you have to construct the result manually (it's a real pain) however, I think it is good now, the month problem was me, I was getting the month number and then indexing the month name array using that, but I needed to do month-1 for the index as it is a 0 based array.
Are you tired?
I'm sorry to bother you.Originally posted by sadra
That's ok, you can bother me as much as you want in order to sort it out fortunately have plenty of time at the moment, but that may not be the case next month.
Are you tired?
I'm sorry to bother you.Originally posted by sadra
That's ok, you can bother me as much as you want in order to sort it out fortunately have plenty of time at the moment, but that may not be the case next month.نوشته شده توسط HuwR
Does the above code help?Originally posted by sadra
Unfortunately not , I will try just creating a static array of month names and see if that helps, but I think the server is getting the month wrong somehow.
works fine on both my local servers
Does the above code help?Originally posted by sadra
Unfortunately not , I will try just creating a static array of month names and see if that helps, but I think the server is getting the month wrong somehow.
works fine on both my local servers نوشته شده توسط HuwR
Thanks Mr. Huw That's enough The rest can be left to later You made a good effort Please switch to a short format and save the changes you made.
Ok great, I'll leave it as is for now, and we can test the timeago later, although it will probably be ok now we have the format correct.نوشته شده توسط HuwR