{"post_stream":{"posts":[{"id":283037,"name":"Mahdi Hosseini","username":"l3est","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","created_at":"2017-04-26T19:43:54.756Z","cooked":"\u003cp\u003eThank you \u003cimg src=\"https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9\" title=\":slight_smile:\" class=\"emoji\" alt=\":slight_smile:\"\u003e\u003c/p\u003e\n\u003cp\u003eI have a question about making plugins for discourse.\u003cbr\u003e\nIran calendar is \u003ca href=\"https://en.wikipedia.org/wiki/Solar_Hijri_calendar\" rel=\"nofollow noopener\"\u003eSolar hijri\u003c/a\u003e or jalali, I want to make a converter to change gregorian date to jalali on view layer of discourse (without changing database).\u003cbr\u003e\nwordpress has a \u003ca href=\"https://wordpress.org/plugins/wp-jalali/\" rel=\"nofollow noopener\"\u003eplugin\u003c/a\u003e that convert all dates on website to jalali.\u003cbr\u003e\nI want to do exact same thing and globally override the date method on view layer and display jalali date if forum language is persian.\u003cbr\u003e\nHow can I do this without changing discourse core codes and database ?\u003c/p\u003e","post_number":1,"post_type":1,"posts_count":12,"updated_at":"2017-04-26T19:54:06.147Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":2497,"reads":71,"readers_count":70,"score":12529.2,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mahdi Hosseini","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://en.wikipedia.org/wiki/Solar_Hijri_calendar","internal":false,"reflection":false,"title":"Solar Hijri calendar - Wikipedia","clicks":14},{"url":"https://wordpress.org/plugins/wp-jalali/","internal":false,"reflection":false,"title":"wp-jalali — WordPress Plugins","clicks":8},{"url":"https://meta.discourse.org/t/translate-discourse-to-persian/61661/3","internal":true,"reflection":true,"title":"Translate Discourse to persian","clicks":2},{"url":"https://meta.discourse.org/t/converting-gregorian-date-to-jalali/341098/19","internal":true,"reflection":true,"title":"How to display all dates and times in Jalali (not Gregorian)","clicks":0}],"read":true,"user_title":null,"reply_to_user":{"id":1995,"username":"zogstrip","name":"","avatar_template":"/user_avatar/meta.discourse.org/zogstrip/{size}/512781_2.png"},"bookmarked":false,"actions_summary":[{"id":2,"count":2}],"moderator":false,"admin":false,"staff":false,"user_id":29079,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/1","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"calendar_details":[],"customer_flair_customer":null,"direct_reply_count":0,"reactions":[{"id":"heart","type":"emoji","count":2}],"current_user_reaction":null,"reaction_users_count":2,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null,"can_vote":false},{"id":283933,"name":"Mahdi Hosseini","username":"l3est","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","created_at":"2017-04-29T14:11:50.281Z","cooked":"\u003cp\u003eAny help ? \u003cimg src=\"https://emoji.discourse-cdn.com/twitter/worried.png?v=9\" title=\":worried:\" class=\"emoji\" alt=\":worried:\"\u003e\u003c/p\u003e","post_number":2,"post_type":1,"posts_count":12,"updated_at":"2017-04-29T14:11:50.281Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":2,"reads":59,"readers_count":58,"score":36.8,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mahdi Hosseini","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":29079,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/2","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":283936,"name":"Mittineague","username":"Mittineague","avatar_template":"/user_avatar/meta.discourse.org/mittineague/{size}/114259_2.png","created_at":"2017-04-29T14:35:43.111Z","cooked":"\u003cp\u003eI’ve looked at a few sites here that I thought might be using different calendars.\u003c/p\u003e\n\u003caside class=\"onebox allowlistedgeneric\"\u003e\n  \u003cheader class=\"source\"\u003e\n      \u003cimg src=\"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/5/e5d6c759ae5b7c6396f0ed2f20c7e211ddde8a42.jpeg\" class=\"site-icon\" width=\"16\" height=\"16\"\u003e\n      \u003ca href=\"https://www.discourse.org/customers\" target=\"_blank\" rel=\"noopener\"\u003eDiscourse - Civilized Discussion\u003c/a\u003e\n  \u003c/header\u003e\n  \u003carticle class=\"onebox-body\"\u003e\n    \u003cimg src=\"https://d11a6trkgmumsb.cloudfront.net/original/3X/5/3/53dc08d92b0b5e73af0254bff87977b0ad1f4609.png\" class=\"thumbnail onebox-avatar\" width=\"221\" height=\"221\"\u003e\n\n\u003ch3\u003e\u003ca href=\"https://www.discourse.org/customers\" target=\"_blank\" rel=\"noopener\"\u003eDiscourse customers\u003c/a\u003e\u003c/h3\u003e\n\n\u003cp\u003eWe love working with our customers to host, build, and customize amazing communities.\u003c/p\u003e\n\n\n  \u003c/article\u003e\n  \u003cdiv class=\"onebox-metadata\"\u003e\n    \n    \n  \u003c/div\u003e\n  \u003cdiv style=\"clear: both\"\u003e\u003c/div\u003e\n\u003c/aside\u003e\n\n\u003cp\u003eA Chinese site is using English and Gregorian dates.\u003cbr\u003e\nHebrew sites look to be using Hebrew month names with Gregorian years.\u003c/p\u003e\n\u003cp\u003eI’m guessing this hasn’t come up before because much of the world uses Gregorian / countries with alternate calendar systems also understand Gregorian?\u003c/p\u003e\n\u003cp\u003eI know the database has a great many timestamp fields, I wouldn’t mess with those.\u003cbr\u003e\nSorry, but I am completely ignorant about converting one calendar to another.\u003cbr\u003e\nDo you know of any Gems that do this?\u003c/p\u003e","post_number":3,"post_type":1,"posts_count":12,"updated_at":"2021-01-31T19:00:02.960Z","reply_count":1,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":27,"reads":58,"readers_count":57,"score":166.6,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mittineague","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://www.discourse.org/customers","internal":false,"reflection":false,"title":"Discourse customers | Discourse - Civilized Discussion","clicks":1}],"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":8617,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/3","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":1,"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":283947,"name":"Mahdi Hosseini","username":"l3est","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","created_at":"2017-04-29T16:27:21.341Z","cooked":"\u003cp\u003eThank you for your response.\u003c/p\u003e\n\u003cp\u003eYou are right, a lot of countries use gregorian dates. But most people (I guess +99%) of people in Iran use jalali calendar.\u003cbr\u003e\nI found this gem called \u003ca href=\"https://github.com/hzamani/parsi-date\" rel=\"noopener nofollow ugc\"\u003eparsi date\u003c/a\u003e but I’m not familiar with ruby language and I don’t know how to use it.\u003cbr\u003e\nas I said before, I don’t want to change discourse’s core or database. just changing the dates on view layer would be great.\u003c/p\u003e\n\u003cp\u003eps : jalali date is not just about month names. years and month length are different too.\u003cbr\u003e\nfor example :\u003cbr\u003e\n29\u003cbr\u003e\nApr\u003cbr\u003e\n2017\u003c/p\u003e\n\u003cp\u003eto jalali :\u003cbr\u003e\n09\u003cbr\u003e\nاردیبهشت ( ordibehesht )\u003cbr\u003e\n1396\u003c/p\u003e","post_number":4,"post_type":1,"posts_count":12,"updated_at":"2017-04-29T16:39:08.292Z","reply_count":1,"reply_to_post_number":3,"quote_count":0,"incoming_link_count":18,"reads":52,"readers_count":51,"score":105.4,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mahdi Hosseini","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://github.com/hzamani/parsi-date","internal":false,"reflection":false,"title":"GitHub - hzamani/parsi-date: Solar Hijri (Jalali, Persian) date library for Ruby","clicks":66}],"read":true,"user_title":null,"reply_to_user":{"id":8617,"username":"Mittineague","name":"Mittineague","avatar_template":"/user_avatar/meta.discourse.org/mittineague/{size}/114259_2.png"},"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":29079,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/4","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":1,"reactions":[],"current_user_reaction":null,"reaction_users_count":0,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":283968,"name":"Daniela","username":"dax","avatar_template":"/user_avatar/meta.discourse.org/dax/{size}/244677_2.png","created_at":"2017-04-29T20:22:12.244Z","cooked":"\u003cp\u003eMaybe you can do that with a simple js script \u003ca href=\"http://farhadi.ir/projects/jalalijscalendar/\" class=\"inline-onebox\" rel=\"nofollow noopener\"\u003eJalaliJSCalendar\u003c/a\u003e\u003c/p\u003e","post_number":5,"post_type":1,"posts_count":12,"updated_at":"2017-04-29T20:22:12.244Z","reply_count":0,"reply_to_post_number":4,"quote_count":0,"incoming_link_count":2,"reads":48,"readers_count":47,"score":169.6,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Daniela","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_bg_color":"","flair_color":"111","flair_group_id":47,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"http://farhadi.ir/projects/jalalijscalendar/","internal":false,"reflection":false,"title":"JalaliJSCalendar","clicks":94}],"read":true,"user_title":"Support Lead - EMEA","title_is_group":false,"reply_to_user":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png"},"bookmarked":false,"actions_summary":[{"id":2,"count":6}],"moderator":true,"admin":true,"staff":true,"group_moderator":true,"user_id":15900,"hidden":false,"trust_level":3,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/5","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[{"id":"heart","type":"emoji","count":6}],"current_user_reaction":null,"reaction_users_count":6,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":284057,"name":"Pad Pors","username":"Pad_Pors","avatar_template":"/user_avatar/meta.discourse.org/pad_pors/{size}/52016_2.png","created_at":"2017-04-30T06:47:40.124Z","cooked":"\u003cp\u003eare you looking for a date-convertor or do you want to know how to change the dates in discourse in a plugin without knowing ruby?\u003c/p\u003e\n\u003cp\u003eif you want the second one, a simple-stupid way is to change it in the front-end side using js, with the data in json pages. e.g. check this page:\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003ehttps://meta.discourse.org/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671.json\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eall the post information exists there! if you search for “2017” you’ll find some dates there, and you can then use some third party calendars and change between the two.\u003c/p\u003e\n\u003cp\u003eso far we’ve used this simple way a lot. it’ll work for short-time until you learn ruby+discourse!\u003c/p\u003e","post_number":6,"post_type":1,"posts_count":12,"updated_at":"2017-04-30T06:48:19.776Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":19,"reads":47,"readers_count":46,"score":164.4,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Pad Pors","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":4}],"moderator":false,"admin":false,"staff":false,"user_id":17969,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/6","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[{"id":"heart","type":"emoji","count":4}],"current_user_reaction":null,"reaction_users_count":4,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":284061,"name":"Mahdi Hosseini","username":"l3est","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","created_at":"2017-04-30T08:06:47.020Z","cooked":"\u003cp\u003e\u003cspan class=\"mention\"\u003e@Trash\u003c/span\u003e Thank you, I know how to convert dates to jalali. I did this in PHP before. I just don’t know how to do it in Ruby on Rails Project.\u003c/p\u003e\n\u003cp\u003e\u003ca class=\"mention\" href=\"/u/pad_pors\"\u003e@Pad_Pors\u003c/a\u003e Thanks, I want to do the second one.\u003cbr\u003e\nWhich .rb file generates this json file ?\u003cbr\u003e\n\u003ca href=\"https://meta.discourse.org/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671.json\" class=\"inline-onebox\"\u003eConverter to change gregorian date to jalali on view layer of discourse\u003c/a\u003e\u003c/p\u003e","post_number":7,"post_type":1,"posts_count":12,"updated_at":"2017-04-30T08:06:47.020Z","reply_count":1,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":4,"reads":48,"readers_count":47,"score":49.6,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mahdi Hosseini","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":29079,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/7","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":1,"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":284065,"name":"Pad Pors","username":"Pad_Pors","avatar_template":"/user_avatar/meta.discourse.org/pad_pors/{size}/52016_2.png","created_at":"2017-04-30T09:36:33.572Z","cooked":"\u003cp\u003eyou don’t need to generate the json files, it already exists and you only need to use it.\u003c/p\u003e\n\u003cp\u003e\u003ca class=\"mention\" href=\"/u/alavi1412\"\u003e@Alavi1412\u003c/a\u003e can help you better about this.\u003c/p\u003e","post_number":8,"post_type":1,"posts_count":12,"updated_at":"2017-04-30T09:36:33.572Z","reply_count":1,"reply_to_post_number":7,"quote_count":0,"incoming_link_count":3,"reads":48,"readers_count":47,"score":44.6,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Pad Pors","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"reply_to_user":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png"},"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":17969,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/8","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":1,"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":284069,"name":"Mahdi Hosseini","username":"l3est","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","created_at":"2017-04-30T10:04:00.154Z","cooked":"\u003cp\u003e\u003ca class=\"mention\" href=\"/u/pad_pors\"\u003e@Pad_Pors\u003c/a\u003e\u003cbr\u003e\nI’m not trying to generate json file. I want to change date before sending to client.\u003c/p\u003e","post_number":9,"post_type":1,"posts_count":12,"updated_at":"2017-04-30T10:04:00.154Z","reply_count":1,"reply_to_post_number":8,"quote_count":0,"incoming_link_count":6,"reads":47,"readers_count":46,"score":74.4,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Mahdi Hosseini","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"reply_to_user":{"id":17969,"username":"Pad_Pors","name":"Pad Pors","avatar_template":"/user_avatar/meta.discourse.org/pad_pors/{size}/52016_2.png"},"bookmarked":false,"actions_summary":[{"id":2,"count":2}],"moderator":false,"admin":false,"staff":false,"user_id":29079,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/9","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":1,"reactions":[{"id":"heart","type":"emoji","count":2}],"current_user_reaction":null,"reaction_users_count":2,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":284096,"name":"SMHassanAlavi","username":"Alavi1412","avatar_template":"/user_avatar/meta.discourse.org/alavi1412/{size}/67721_2.png","created_at":"2017-04-30T13:18:36.292Z","cooked":"\u003cp\u003eSo not try to change the source code.\u003cbr\u003e\nYou just need a javascript to select the date element at your page and change it and add it to your page.\u003cbr\u003e\nI think Topic controller is making this for you but for changing this you need to know some Ruby.\u003cbr\u003e\nI suggest you to create a very simple plugin and change the date by selecting elements completely in javascript\u003c/p\u003e","post_number":10,"post_type":1,"posts_count":12,"updated_at":"2017-04-30T13:18:36.292Z","reply_count":0,"reply_to_post_number":9,"quote_count":0,"incoming_link_count":4,"reads":48,"readers_count":47,"score":29.6,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"SMHassanAlavi","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"reply_to_user":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png"},"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":24199,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/10","locale":null,"is_localized":false,"activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[],"current_user_reaction":null,"reaction_users_count":0,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":704752,"name":"محمدرضا چاوشی پور","username":"60d9eb1b376343f4e7b4","avatar_template":"/user_avatar/meta.discourse.org/60d9eb1b376343f4e7b4/{size}/169628_2.png","created_at":"2020-02-22T15:46:16.513Z","cooked":"\u003cp\u003eHi\u003cbr\u003e\nIs it possible for anyone to write a date conversion plugin written by Jalali?\u003cbr\u003e\nWe need such a plugin.\u003cbr\u003e\nIf anyone can guide, thank you.\u003c/p\u003e","post_number":11,"post_type":1,"posts_count":12,"updated_at":"2020-02-22T15:46:16.513Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":6,"reads":30,"readers_count":29,"score":36.0,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"محمدرضا چاوشی پور","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":43517,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/11","locale":"en","is_localized":false,"language":"en","activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[],"current_user_reaction":null,"reaction_users_count":0,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":1914020,"name":"Arta","username":"Arta_S","avatar_template":"/user_avatar/meta.discourse.org/arta_s/{size}/537495_2.png","created_at":"2026-01-01T17:56:53.848Z","cooked":"\u003cp\u003eHi,\u003c/p\u003e\n\u003cp\u003eI made some new updates to cover some of the conditions. Though it might need some additional adjustments.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003e\u003ca name=\"p-1914020-step-by-step-shamsi-dates-on-discourse-frontend-for-persian-language-if-your-language-is-in-arabic-make-your-adjustments-in-the-code-1\" class=\"anchor\" href=\"#p-1914020-step-by-step-shamsi-dates-on-discourse-frontend-for-persian-language-if-your-language-is-in-arabic-make-your-adjustments-in-the-code-1\" aria-label=\"Heading link\"\u003e\u003c/a\u003eStep-by-step: Shamsi dates on Discourse frontend for Persian Language (if your language is in Arabic, make your adjustments in the code)\u003c/h2\u003e\n\u003ch3\u003e\u003ca name=\"p-1914020-h-1-create-a-theme-component-2\" class=\"anchor\" href=\"#p-1914020-h-1-create-a-theme-component-2\" aria-label=\"Heading link\"\u003e\u003c/a\u003e1) Create a Theme Component\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eGo to \u003cstrong\u003eAdmin → Customize → Themes\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eClick \u003cstrong\u003eComponents\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eClick \u003cstrong\u003eAdd → Create new\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eName it: \u003cstrong\u003eShamsi Date Converter (Or whatever you want)\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003chr\u003e\n\u003ch3\u003e\u003ca name=\"p-1914020-h-2-add-the-script-head-section-3\" class=\"anchor\" href=\"#p-1914020-h-2-add-the-script-head-section-3\" aria-label=\"Heading link\"\u003e\u003c/a\u003e2) Add the script (Head section)\u003c/h3\u003e\n\u003cp\u003eInside the component:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eOpen \u003cstrong\u003eCommon → Head\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003ePaste \u003cstrong\u003eeverything below\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eSave\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cstrong\u003eCode:\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"lang-plaintext\"\u003e\u0026lt;script\u0026gt;\n(function () {\n  if (!document.documentElement.lang.startsWith(\"fa\")) return;\n\n  // Formatters\n  const fullFormatter = new Intl.DateTimeFormat(\"fa-IR-u-ca-persian\", { dateStyle: \"medium\" });\n  const monthYearFormatter = new Intl.DateTimeFormat(\"fa-IR-u-ca-persian\", { year: \"numeric\", month: \"long\" });\n  const dayMonthFormatter = new Intl.DateTimeFormat(\"fa-IR-u-ca-persian\", { day: \"numeric\", month: \"long\" });\n\n  const gregorianMonthsFa = new Map([\n    [\"ژانویه\", 0], [\"فوریه\", 1], [\"مارس\", 2], [\"آوریل\", 3], [\"مه\", 4], [\"ژوئن\", 5],\n    [\"ژوئیه\", 6], [\"ژوئیهٔ\", 6], [\"اوت\", 7], [\"اگوست\", 7], [\"سپتامبر\", 8],\n    [\"اکتبر\", 9], [\"نوامبر\", 10], [\"دسامبر\", 11],\n  ]);\n\n  function toLatinDigits(str) {\n    return (str || \"\")\n      .replace(/[۰-۹]/g, d =\u0026gt; String(\"۰۱۲۳۴۵۶۷۸۹\".indexOf(d)))\n      .replace(/[٠-٩]/g, d =\u0026gt; String(\"٠١٢٣٤٥٦٧٨٩\".indexOf(d)));\n  }\n\n  function toDate(value) {\n    if (!value) return null;\n    if (/^\\d{10,13}$/.test(value)) {\n      const n = Number(value);\n      return new Date(value.length === 10 ? n * 1000 : n);\n    }\n    const d = new Date(value);\n    return isNaN(d.getTime()) ? null : d;\n  }\n\n  function processTimeElement(el) {\n    // Allow re-processing if Discourse overwrote text\n    // We mark last applied value so we can detect overwrite.\n    const date =\n      toDate(el.getAttribute(\"datetime\")) ||\n      toDate(el.getAttribute(\"data-time\")) ||\n      toDate(el.dataset \u0026amp;\u0026amp; el.dataset.time) ||\n      toDate(el.getAttribute(\"title\"));\n\n    if (!date) return;\n\n    const formatted = fullFormatter.format(date);\n    if (el.textContent !== formatted) {\n      el.textContent = formatted;\n    }\n  }\n\n  function findTimelineYear(rootEl) {\n    const container = rootEl.closest(\".timeline-scrollarea-wrapper\") || document;\n    const candidates = container.querySelectorAll(\".timeline-date-wrapper, .start-date span, .timeline-ago\");\n    for (const el of candidates) {\n      const text = (el.textContent || \"\").trim().replace(/\\s+/g, \" \");\n      const m = text.match(/^(\\S+)\\s+([۰-۹٠-٩0-9]{4})$/);\n      if (!m) continue;\n      const year = Number(toLatinDigits(m[2]));\n      if (Number.isFinite(year) \u0026amp;\u0026amp; year \u0026gt;= 1970 \u0026amp;\u0026amp; year \u0026lt;= 2100) return year;\n    }\n    return new Date().getFullYear();\n  }\n\n  function parseGregorianMonthYearFa(text) {\n    const cleaned = (text || \"\").trim().replace(/\\s+/g, \" \");\n    const parts = cleaned.split(\" \");\n    if (parts.length !== 2) return null;\n    const monthIndex = gregorianMonthsFa.get(parts[0]);\n    const year = Number(toLatinDigits(parts[1]));\n    if (monthIndex === undefined || !Number.isFinite(year) || year \u0026lt; 1970 || year \u0026gt; 2100) return null;\n    return new Date(Date.UTC(year, monthIndex, 1));\n  }\n\n  function parseGregorianDayMonthFa(text, assumedYear) {\n    const cleaned = (text || \"\").trim().replace(/\\s+/g, \" \");\n    const parts = cleaned.split(\" \");\n    if (parts.length !== 2) return null;\n    const day = Number(toLatinDigits(parts[0]));\n    const monthIndex = gregorianMonthsFa.get(parts[1]);\n    if (monthIndex === undefined || !Number.isFinite(day) || day \u0026lt; 1 || day \u0026gt; 31) return null;\n    const d = new Date(Date.UTC(assumedYear, monthIndex, day));\n    return isNaN(d.getTime()) ? null : d;\n  }\n\n  function processTimelineLabel(el) {\n    const text = (el.textContent || \"\").trim();\n    if (!text) return;\n\n    const d1 = parseGregorianMonthYearFa(text);\n    if (d1) {\n      const formatted = monthYearFormatter.format(d1);\n      if (el.textContent !== formatted) el.textContent = formatted;\n      return;\n    }\n\n    const year = findTimelineYear(el);\n    const d2 = parseGregorianDayMonthFa(text, year);\n    if (d2) {\n      const formatted = dayMonthFormatter.format(d2);\n      if (el.textContent !== formatted) el.textContent = formatted;\n    }\n  }\n\n  function run(root = document) {\n    // 1) Real time-based elements\n    root.querySelectorAll(\"time, .relative-date\").forEach(processTimeElement);\n\n    // 2) Timeline plain labels\n    root.querySelectorAll(\n      \".timeline-scrollarea-wrapper .timeline-ago, \" +\n      \".timeline-scrollarea-wrapper .start-date span, \" +\n      \".timeline-scrollarea-wrapper .timeline-date-wrapper span\"\n    ).forEach(processTimelineLabel);\n  }\n\n  // Initial\n  run();\n\n  // IMPORTANT: Observe text changes too, not just added nodes\n  const obs = new MutationObserver((muts) =\u0026gt; {\n    for (const m of muts) {\n      // If nodes are added, process them\n      if (m.addedNodes \u0026amp;\u0026amp; m.addedNodes.length) {\n        m.addedNodes.forEach(n =\u0026gt; { if (n.nodeType === 1) run(n); });\n      }\n      // If text changes, re-run on the parent element\n      if (m.type === \"characterData\" \u0026amp;\u0026amp; m.target \u0026amp;\u0026amp; m.target.parentElement) {\n        run(m.target.parentElement);\n      }\n    }\n  });\n\n  obs.observe(document.documentElement, {\n    subtree: true,\n    childList: true,\n    characterData: true // \u0026lt;-- this is the key change\n  });\n\n  // Re-apply when tab becomes active again (Discourse often re-renders then)\n  function reapplySoon() {\n    // two passes handle immediate + next tick re-renders\n    run();\n    setTimeout(run, 250);\n    setTimeout(run, 1000);\n  }\n\n  document.addEventListener(\"visibilitychange\", () =\u0026gt; {\n    if (!document.hidden) reapplySoon();\n  });\n\n  window.addEventListener(\"focus\", reapplySoon);\n})();\n\u0026lt;/script\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAlternatively you can upload the what I exported and assign it to your themes.\u003c/p\u003e\n\u003cp\u003e\u003ca class=\"attachment\" href=\"/uploads/short-url/pvWyp75esmYt5HQV7NSzGE4oFGA.zip\"\u003ediscourse-shamsi-date.zip\u003c/a\u003e (2.4 KB)\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003e\u003ca name=\"p-1914020-how-it-works-4\" class=\"anchor\" href=\"#p-1914020-how-it-works-4\" aria-label=\"Heading link\"\u003e\u003c/a\u003eHow it works\u003c/h2\u003e\n\u003cp\u003eDiscourse already sends normal Gregorian dates to your browser; this script does not change the data, it only replaces how the date text is displayed on the page, converting it to Shamsi (Jalali) using the browser itself.\u003c/p\u003e\n\u003ch2\u003e\u003ca name=\"p-1914020-what-the-script-does-high-level-5\" class=\"anchor\" href=\"#p-1914020-what-the-script-does-high-level-5\" aria-label=\"Heading link\"\u003e\u003c/a\u003eWhat the script does (high level)\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eFinds those \u003ccode\u003e\u0026lt;time\u0026gt;\u003c/code\u003e elements\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eReads the real Gregorian date from \u003ccode\u003edatetime\u003c/code\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eConverts it to Shamsi\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eReplaces \u003cstrong\u003eonly the visible text\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eRepeats this whenever new posts load\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eI also updated the code for the issue with re-rendering. This happens when you step away from the tab, and discourse re-renders the page and it reverts back to Default Date. It appears it fixed the issue.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eThis will give you dates like this:\u003c/p\u003e\n\u003cp\u003e\u003cdiv class=\"lightbox-wrapper\"\u003e\u003ca class=\"lightbox\" href=\"https://d11a6trkgmumsb.cloudfront.net/original/4X/2/9/5/2955eae729a397690c9d5a3b423106adb4a60070.jpeg\" data-download-href=\"/uploads/short-url/5TFExuQnMBA6uspRy5TSFVkBNyU.jpeg?dl=1\" title=\"image\" rel=\"noopener nofollow ugc\"\u003e\u003cimg src=\"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/9/5/2955eae729a397690c9d5a3b423106adb4a60070_2_690x447.jpeg\" alt=\"image\" data-base62-sha1=\"5TFExuQnMBA6uspRy5TSFVkBNyU\" width=\"690\" height=\"447\" srcset=\"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/9/5/2955eae729a397690c9d5a3b423106adb4a60070_2_690x447.jpeg, https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/9/5/2955eae729a397690c9d5a3b423106adb4a60070_2_1035x670.jpeg 1.5x, https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/9/5/2955eae729a397690c9d5a3b423106adb4a60070_2_1380x894.jpeg 2x\" data-dominant-color=\"F4F3F4\"\u003e\u003cdiv class=\"meta\"\u003e\u003csvg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"\u003e\u003cuse href=\"#far-image\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003cspan class=\"filename\"\u003eimage\u003c/span\u003e\u003cspan class=\"informations\"\u003e1920×1244 221 KB\u003c/span\u003e\u003csvg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"\u003e\u003cuse href=\"#discourse-expand\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003c/a\u003e\u003c/div\u003e\u003c/p\u003e\n\u003cp\u003e\u003cdiv class=\"lightbox-wrapper\"\u003e\u003ca class=\"lightbox\" href=\"https://d11a6trkgmumsb.cloudfront.net/original/4X/8/9/1/891e552257c2939aab13f4386b3099c57bab30d0.jpeg\" data-download-href=\"/uploads/short-url/jz0oQ6t1yM5Zj5WzfAOjZ4LVE3e.jpeg?dl=1\" title=\"image\" rel=\"noopener nofollow ugc\"\u003e\u003cimg src=\"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/8/9/1/891e552257c2939aab13f4386b3099c57bab30d0_2_441x500.jpeg\" alt=\"image\" data-base62-sha1=\"jz0oQ6t1yM5Zj5WzfAOjZ4LVE3e\" width=\"441\" height=\"500\" srcset=\"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/8/9/1/891e552257c2939aab13f4386b3099c57bab30d0_2_441x500.jpeg, https://d11a6trkgmumsb.cloudfront.net/optimized/4X/8/9/1/891e552257c2939aab13f4386b3099c57bab30d0_2_661x750.jpeg 1.5x, https://d11a6trkgmumsb.cloudfront.net/optimized/4X/8/9/1/891e552257c2939aab13f4386b3099c57bab30d0_2_882x1000.jpeg 2x\" data-dominant-color=\"F9F9FC\"\u003e\u003cdiv class=\"meta\"\u003e\u003csvg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"\u003e\u003cuse href=\"#far-image\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003cspan class=\"filename\"\u003eimage\u003c/span\u003e\u003cspan class=\"informations\"\u003e1048×1186 45.2 KB\u003c/span\u003e\u003csvg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"\u003e\u003cuse href=\"#discourse-expand\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003c/a\u003e\u003c/div\u003e\u003c/p\u003e\n\u003cp\u003eYou can view it online on our instance: \u003ca href=\"https://forums.7ho.st\" rel=\"noopener nofollow ugc\"\u003ehttps://forums.7ho.st\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eGood luck\u003c/p\u003e","post_number":12,"post_type":1,"posts_count":12,"updated_at":"2026-01-01T18:38:32.602Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":6,"reads":9,"readers_count":8,"score":46.8,"yours":false,"topic_id":61671,"topic_slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","display_username":"Arta","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":5,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://forums.7ho.st","internal":false,"reflection":false,"title":"انجمن سون هاست - میزبانی وب، آموزش وردپرس، امنیت و سئو","clicks":4}],"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":25960,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse/61671/12","locale":"en","is_localized":false,"language":"en","activity_pub_enabled":false,"boosts":[],"can_boost":false,"event":null,"customer_flair_customer":null,"direct_reply_count":0,"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null}],"stream":[283037,283933,283936,283947,283968,284057,284061,284065,284069,284096,704752,1914020]},"timeline_lookup":[[1,3270],[2,3267],[10,3266],[11,2238],[12,98]],"suggested_topics":[],"tags":[],"tags_descriptions":{},"fancy_title":"Converter to change gregorian date to jalali on view layer of discourse","fancy_title_localized":false,"locale":null,"id":61671,"title":"Converter to change gregorian date to jalali on view layer of discourse","posts_count":12,"created_at":"2017-04-26T19:43:54.756Z","views":6301,"reply_count":5,"like_count":19,"last_posted_at":"2026-01-01T17:56:53.848Z","visible":true,"closed":false,"archived":false,"has_summary":false,"archetype":"regular","slug":"converter-to-change-gregorian-date-to-jalali-on-view-layer-of-discourse","category_id":7,"word_count":1523,"deleted_at":null,"user_id":29079,"featured_link":null,"pinned_globally":false,"pinned_at":null,"pinned_until":null,"image_url":null,"slow_mode_seconds":0,"draft":null,"draft_key":"topic_61671","draft_sequence":null,"unpinned":null,"pinned":false,"current_post_number":1,"highest_post_number":12,"deleted_by":null,"actions_summary":[{"id":4,"count":0,"hidden":false,"can_act":false},{"id":8,"count":0,"hidden":false,"can_act":false},{"id":10,"count":0,"hidden":false,"can_act":false},{"id":7,"count":0,"hidden":false,"can_act":false},{"id":1002,"count":0,"hidden":false,"can_act":false}],"chunk_size":20,"bookmarked":false,"topic_timer":null,"message_bus_last_id":0,"participant_count":7,"show_read_indicator":false,"thumbnails":null,"slow_mode_enabled_until":null,"has_localized_content":false,"activity_pub_enabled":null,"related_topics":[{"fancy_title":"How to properly display jalali dates for Persian language","fancy_title_localized":false,"locale":"en","id":62157,"title":"How to properly display jalali dates for Persian language","slug":"how-to-properly-display-jalali-dates-for-persian-language","posts_count":23,"reply_count":12,"highest_post_number":25,"image_url":null,"created_at":"2017-05-05T10:15:46.535Z","last_posted_at":"2024-12-09T20:43:07.162Z","bumped":true,"bumped_at":"2024-12-09T20:43:07.162Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"I\u0026#39;m a new rails/discourse developer. I\u0026#39;m wondering if someone could tell me about discourse structure. I wanted to edit some view files so I edited discourse/app/views/[view-folder]/[*.html.erb] files and nothing changed\u0026hellip;","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":32,"views":13952,"category_id":27,"featured_link":null,"op_like_count":1,"ai_topic_gist":"Converting dates to Hijri or Jalali format is discussed, with a user seeking steps to change dates in the forum, referencing a Hijri plugin and client.ar.yml file modifications.","has_accepted_answer":false,"posters":[{"extras":null,"description":"Исходный автор","user":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","trust_level":1}},{"extras":null,"description":"Частый автор","user":{"id":15209,"username":"pfaffman","name":"Jay Pfaffman","avatar_template":"/user_avatar/meta.discourse.org/pfaffman/{size}/120154_2.png","flair_name":"support-experts","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/2/e250ec403580530d19e6a9ed42d0d525a51a9dbe.svg","flair_bg_color":"FFFFFF","flair_group_id":142,"trust_level":4}},{"extras":null,"description":"Частый автор","user":{"id":464,"username":"DeanMarkTaylor","name":"Dean Taylor","avatar_template":"/user_avatar/meta.discourse.org/deanmarktaylor/{size}/102462_2.png","trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":32,"username":"codinghorror","name":"Jeff Atwood","avatar_template":"/user_avatar/meta.discourse.org/codinghorror/{size}/110067_2.png","admin":true,"trust_level":2}},{"extras":"latest","description":"Последний автор","user":{"id":164623,"username":"serkhelesheyi","name":"serkhelesheyi","avatar_template":"/user_avatar/meta.discourse.org/serkhelesheyi/{size}/497726_2.png","trust_level":2}}]},{"fancy_title":"Как отображать все даты и время в джалали (не григорианском)","fancy_title_localized":true,"locale":"en","id":341098,"title":"How to display all dates and times in Jalali (not Gregorian)","slug":"how-to-display-all-dates-and-times-in-jalali-not-gregorian","posts_count":21,"reply_count":15,"highest_post_number":23,"image_url":null,"created_at":"2024-12-07T12:28:08.238Z","last_posted_at":"2024-12-10T16:13:45.378Z","bumped":true,"bumped_at":"2024-12-10T16:13:39.184Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"Я установил Discourse на Ubuntu локально, вне Docker. Как можно преобразовать даты на форуме в иранские даты?\nСпасибо","visible":true,"closed":true,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":22,"views":396,"category_id":6,"featured_link":null,"op_like_count":2,"ai_topic_gist":"Displaying Jalali dates in Discourse requires a plugin, as current locale settings only translate Gregorian month names to Persian, and a technical solution using moment.js or a similar library is needed.","has_accepted_answer":true,"posters":[{"extras":null,"description":"Исходный автор","user":{"id":164623,"username":"serkhelesheyi","name":"serkhelesheyi","avatar_template":"/user_avatar/meta.discourse.org/serkhelesheyi/{size}/497726_2.png","trust_level":2}},{"extras":null,"description":"Частый автор, Принятый ответ","user":{"id":95552,"username":"Moin","name":"","avatar_template":"/user_avatar/meta.discourse.org/moin/{size}/523407_2.png","trust_level":3}},{"extras":null,"description":"Частый автор","user":{"id":76501,"username":"Andro","name":"Andrew Bernard","avatar_template":"/user_avatar/meta.discourse.org/andro/{size}/173721_2.png","trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":63143,"username":"Ed_S","name":"Ed S","avatar_template":"/user_avatar/meta.discourse.org/ed_s/{size}/134015_2.png","trust_level":3}},{"extras":"latest","description":"Последний автор","user":{"id":8571,"username":"tobiaseigen","name":"Tobias Eigen","avatar_template":"/user_avatar/meta.discourse.org/tobiaseigen/{size}/539204_2.png","trust_level":3}}]},{"fancy_title":"Translate Discourse to persian","fancy_title_localized":false,"locale":null,"id":61661,"title":"Translate Discourse to persian","slug":"translate-discourse-to-persian","posts_count":4,"reply_count":3,"highest_post_number":4,"image_url":null,"created_at":"2017-04-26T17:33:22.710Z","last_posted_at":"2017-05-01T06:13:25.981Z","bumped":true,"bumped_at":"2017-05-04T15:48:06.523Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"Hello dear discourse team,  I have started to translate the discourse to Persian in Transifex Can you give Persian Reviewer rights to me?","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":3,"views":2162,"category_id":27,"featured_link":null,"op_like_count":1,"ai_topic_gist":null,"has_accepted_answer":false,"posters":[{"extras":"latest","description":"Исходный автор, Последний автор","user":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","trust_level":1}},{"extras":null,"description":"Частый автор","user":{"id":1995,"username":"zogstrip","name":"","avatar_template":"/user_avatar/meta.discourse.org/zogstrip/{size}/512781_2.png","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":5351,"username":"erlend_sh","name":"Erlend Sogge Heggen","avatar_template":"/user_avatar/meta.discourse.org/erlend_sh/{size}/119475_2.png","trust_level":2}}]},{"fancy_title":"Localised inline date/time","fancy_title_localized":false,"locale":null,"id":24149,"title":"Localised inline date/time","slug":"localised-inline-date-time","posts_count":32,"reply_count":25,"highest_post_number":33,"image_url":null,"created_at":"2015-01-18T16:25:16.933Z","last_posted_at":"2018-05-07T16:00:01.870Z","bumped":true,"bumped_at":"2018-05-04T06:15:30.386Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"Timezones suck, especially when they make you miss meetings. \n\nIt would be incredibly useful to be able to add a date to a post, and have it automagically change into the timezone of the person reading it (if there\u0026#39;s dat\u0026hellip;","visible":true,"closed":true,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":65,"views":3951,"category_id":2,"featured_link":null,"op_like_count":6,"ai_topic_gist":"Discourse's localized inline date/time feature has been renamed to [date] with an improved, more readable syntax, and the plugin is now named discourse-local-dates, with no major changes expected, but small edits possible.","has_accepted_answer":false,"posters":[{"extras":null,"description":"Исходный автор","user":{"id":12921,"username":"LeoMcA","name":"Leo McArdle","avatar_template":"/user_avatar/meta.discourse.org/leomca/{size}/87233_2.png","trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":23163,"username":"j.jaffeux","name":"Joffrey Jaffeux","avatar_template":"/user_avatar/meta.discourse.org/j.jaffeux/{size}/60297_2.png","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":13042,"username":"Stephen","name":"Stephen","avatar_template":"/user_avatar/meta.discourse.org/stephen/{size}/95011_2.png","flair_name":"support-experts","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/2/e250ec403580530d19e6a9ed42d0d525a51a9dbe.svg","flair_bg_color":"FFFFFF","flair_group_id":142,"trust_level":4}},{"extras":null,"description":"Частый автор","user":{"id":32,"username":"codinghorror","name":"Jeff Atwood","avatar_template":"/user_avatar/meta.discourse.org/codinghorror/{size}/110067_2.png","admin":true,"trust_level":2}},{"extras":"latest","description":"Последний автор","user":{"id":1,"username":"sam","name":"Sam Saffron","avatar_template":"/user_avatar/meta.discourse.org/sam/{size}/102149_2.png","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":3}}]},{"fancy_title":"Ошибка сервера при предпросмотре дайджест-писем","fancy_title_localized":true,"locale":"en","id":380954,"title":"Internal Server Error when previewing digest emails","slug":"internal-server-error-when-previewing-digest-emails","posts_count":23,"reply_count":17,"highest_post_number":26,"image_url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_1024x564.png","created_at":"2025-08-29T22:36:13.351Z","last_posted_at":"2025-10-23T10:34:05.309Z","bumped":true,"bumped_at":"2025-10-23T10:34:05.309Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"Здравствуйте,\nЯ работаю на версии Discourse 3.6.0.beta1-dev и столкнулся с проблемой при попытке предпросмотра сводного письма из панели администратора:\n/admin/email/preview-digest\nОписание проблемы\n\nПри нажатии на кнопку отправки сводного письма я получаю ошибку Inte\u0026hellip;","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":[{"max_width":null,"max_height":null,"width":1400,"height":772,"url":"https://d11a6trkgmumsb.cloudfront.net/original/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd.png"},{"max_width":1024,"max_height":1024,"width":1024,"height":564,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_1024x564.png"},{"max_width":800,"max_height":800,"width":800,"height":441,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_800x441.png"},{"max_width":600,"max_height":600,"width":600,"height":330,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_600x330.png"},{"max_width":400,"max_height":400,"width":400,"height":220,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_400x220.png"},{"max_width":300,"max_height":300,"width":300,"height":165,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_300x165.png"},{"max_width":200,"max_height":200,"width":200,"height":110,"url":"https://d11a6trkgmumsb.cloudfront.net/optimized/4X/2/0/a/20a40e19bb4fd979a988abc20054c28116ec83cd_2_200x110.png"}],"tags":[{"id":39,"name":"email","slug":"email"},{"id":68,"name":"приветствие-прат","slug":"pr-welcome"},{"id":662,"name":"итоги-активности","slug":"activity-summary"}],"tags_descriptions":{"приветствие-прат":"Вы можете отправить pull-запрос в Github, реализующий это"},"like_count":14,"views":336,"category_id":1,"featured_link":null,"op_like_count":1,"ai_topic_gist":"An internal server error occurs when previewing digest emails in Discourse 3.6.0.beta1-dev due to a comparison error between strings and time objects, triggered by Arabic numerals in date inputs, with a proposed fix involving date normalization to ASCII format for consistent handling.","has_accepted_answer":false,"posters":[{"extras":null,"description":"Исходный автор","user":{"id":159649,"username":"xkhalid","name":"","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/x/3ab097/{size}.png","trust_level":2}},{"extras":null,"description":"Частый автор","user":{"id":104279,"username":"nat","name":"Natalie T","avatar_template":"/user_avatar/meta.discourse.org/nat/{size}/235063_2.png","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":3}},{"extras":null,"description":"Частый автор","user":{"id":1,"username":"sam","name":"Sam Saffron","avatar_template":"/user_avatar/meta.discourse.org/sam/{size}/102149_2.png","primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":3}},{"extras":null,"description":"Частый автор","user":{"id":95552,"username":"Moin","name":"","avatar_template":"/user_avatar/meta.discourse.org/moin/{size}/523407_2.png","trust_level":3}},{"extras":"latest","description":"Последний автор","user":{"id":116813,"username":"ghassan","name":"Ghassan Maslamani","avatar_template":"/user_avatar/meta.discourse.org/ghassan/{size}/263566_2.png","trust_level":2}}]}],"summarizable":false,"has_cached_summary":true,"is_nested_view":null,"valid_reactions":["heart","laughing","cry","exploding_head","clap","confetti_ball","hugs","chefs_kiss","100","+1","rocket","star_struck","discourse","eyes"],"can_vote":false,"vote_count":0,"user_voted":false,"discourse_zendesk_plugin_zendesk_id":null,"discourse_zendesk_plugin_zendesk_url":"https://your-url.zendesk.com/agent/tickets/","details":{"can_edit":false,"notification_level":1,"participants":[{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png","post_count":5,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":1},{"id":17969,"username":"Pad_Pors","name":"Pad Pors","avatar_template":"/user_avatar/meta.discourse.org/pad_pors/{size}/52016_2.png","post_count":2,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2},{"id":8617,"username":"Mittineague","name":"Mittineague","avatar_template":"/user_avatar/meta.discourse.org/mittineague/{size}/114259_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":1},{"id":25960,"username":"Arta_S","name":"Arta","avatar_template":"/user_avatar/meta.discourse.org/arta_s/{size}/537495_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2},{"id":43517,"username":"60d9eb1b376343f4e7b4","name":"محمدرضا چاوشی پور","avatar_template":"/user_avatar/meta.discourse.org/60d9eb1b376343f4e7b4/{size}/169628_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":1},{"id":24199,"username":"Alavi1412","name":"SMHassanAlavi","avatar_template":"/user_avatar/meta.discourse.org/alavi1412/{size}/67721_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2},{"id":15900,"username":"dax","name":"Daniela","avatar_template":"/user_avatar/meta.discourse.org/dax/{size}/244677_2.png","post_count":1,"primary_group_name":"team","flair_name":"team","flair_url":"https://d11a6trkgmumsb.cloudfront.net/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_bg_color":"","flair_group_id":47,"admin":true,"moderator":true,"trust_level":3}],"created_by":{"id":29079,"username":"l3est","name":"Mahdi Hosseini","avatar_template":"/user_avatar/meta.discourse.org/l3est/{size}/172909_2.png"},"last_poster":{"id":25960,"username":"Arta_S","name":"Arta","avatar_template":"/user_avatar/meta.discourse.org/arta_s/{size}/537495_2.png"},"links":[{"url":"http://farhadi.ir/projects/jalalijscalendar/","title":"JalaliJSCalendar","internal":false,"attachment":false,"reflection":false,"clicks":94,"user_id":15900,"domain":"farhadi.ir","root_domain":"farhadi.ir"},{"url":"https://github.com/hzamani/parsi-date","title":"GitHub - hzamani/parsi-date: Solar Hijri (Jalali, Persian) date library for Ruby","internal":false,"attachment":false,"reflection":false,"clicks":66,"user_id":29079,"domain":"github.com","root_domain":"github.com"},{"url":"https://en.wikipedia.org/wiki/Solar_Hijri_calendar","title":"Solar Hijri calendar - Wikipedia","internal":false,"attachment":false,"reflection":false,"clicks":14,"user_id":29079,"domain":"en.wikipedia.org","root_domain":"wikipedia.org"},{"url":"https://wordpress.org/plugins/wp-jalali/","title":"wp-jalali — WordPress Plugins","internal":false,"attachment":false,"reflection":false,"clicks":8,"user_id":29079,"domain":"wordpress.org","root_domain":"wordpress.org"},{"url":"https://forums.7ho.st","title":"انجمن سون هاست - میزبانی وب، آموزش وردپرس، امنیت و سئو","internal":false,"attachment":false,"reflection":false,"clicks":4,"user_id":25960,"domain":"forums.7ho.st","root_domain":"7ho.st"},{"url":"https://meta.discourse.org/t/translate-discourse-to-persian/61661/3","title":"Translate Discourse to persian","internal":true,"attachment":false,"reflection":true,"clicks":2,"user_id":5351,"domain":"meta.discourse.org","root_domain":"discourse.org"},{"url":"https://www.discourse.org/customers","title":"Discourse customers | Discourse - Civilized Discussion","internal":false,"attachment":false,"reflection":false,"clicks":1,"user_id":8617,"domain":"www.discourse.org","root_domain":"discourse.org"}]},"bookmarks":[]}