Commit Graph

7 Commits

Author SHA1 Message Date
036e27e69a DEV: Move distance_of_time_in_words/time_ago_in_words (#21745)
It wasn't a patch (just two helper functions that were called directly) and no longer has much to do with "Rails 4"
2023-05-25 14:53:59 +02:00
6417173082 DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
d0955e02d6 reused value of Time.now in a method
`Time.now` was being used to fetch the current time, twice in the
same line. This commit stores the time value in a variable and
reuses it instead of generating/fetching it for the second time.

Additionally, a guard clause in the same method is substituted by
an `if/else/end` block for clarity.
2015-12-01 21:06:37 +00:00
Sam
fcc6aac008 hacked dates so jeff sees no more 1mons everywhere. 2013-03-13 00:05:21 -07:00
2e76e337a6 1st attempt to support i18n in dates and times 2013-03-07 20:05:18 +01:00
21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00