mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	We follow how other apps present older messages, e.g. Gmail, Facebook Messenger, etc. display it. Specifically, the logic we use is: If the time is <24hr ago, show an absolute time, like "21:30" (or "9:30pm"). Otherwise, show what day it was, and not a time If the day was yesterday, say "Yesterday". Otherwise, if it was <7 days ago, say the day of week, like "Friday". Otherwise, if it was <1 year ago, say the month and day, like "Sep 6". Otherwise, say the year, month, and day, like "Sep 9, 2020". With some tweaks from Tim Abbott to better handle the future case. Fixes #19775