<commit_before>import moment from 'moment';

Template.dateCell.helpers({
  'formattedDate': function () {
    // Load the Finnish locale
    moment.locale('fi');

    // Create resident latest activity variable
    var activity = this;

    // Convert latest activity date to 'from now' format
    var activityDateFormatted = moment(activity.activityDate).fromNow();

    return activityDateFormatted;
  }
});<commit_msg>Use client locale for date format<commit_after>import moment from 'moment';

Template.dateCell.helpers({
  'formattedDate': function () {
    // Get client locale
    const clientLocale = TAPi18n.getLanguage();

    // Load the client locale into Moment
    moment.locale(clientLocale);

    // Create resident latest activity variable
    var activity = this;

    // Convert latest activity date to 'from now' format
    var activityDateFormatted = moment(activity.activityDate).fromNow();

    return activityDateFormatted;
  }
});
{'fraction_non_alphanumeric': 0.09947643979057591, 'fraction_numerical': 0.0020942408376963353, 'mean_word_length': 3.6862745098039214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '923520', 'n_tokens_mistral': 254, 'n_tokens_neox': 245, 'n_words': 79}