2014-12-18 18:40:49 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-12-18 18:40:49 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-12-18 18:40:49 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-04-13 17:59:05 +00:00
|
|
|
#include "lang/lang_instance.h"
|
2017-09-28 20:11:10 +00:00
|
|
|
#include "lang/lang_hardcoded.h"
|
2017-04-12 19:17:55 +00:00
|
|
|
|
2019-06-19 15:09:03 +00:00
|
|
|
QString langDayOfMonth(const QDate &date);
|
|
|
|
QString langDayOfMonthFull(const QDate &date);
|
|
|
|
QString langMonthOfYear(int month, int year);
|
|
|
|
QString langMonth(const QDate &date);
|
|
|
|
QString langMonthOfYearFull(int month, int year);
|
|
|
|
QString langMonthFull(const QDate &date);
|
|
|
|
QString langDayOfWeek(int index);
|
2015-12-22 15:32:45 +00:00
|
|
|
|
2017-04-13 08:45:58 +00:00
|
|
|
inline QString langDayOfWeek(const QDate &date) {
|
2017-03-07 14:03:07 +00:00
|
|
|
return langDayOfWeek(date.dayOfWeek());
|
|
|
|
}
|
|
|
|
|
2017-04-13 08:45:58 +00:00
|
|
|
inline QString langDateTime(const QDateTime &date) {
|
2019-06-19 16:39:25 +00:00
|
|
|
return tr::lng_mediaview_date_time(
|
|
|
|
tr::now,
|
|
|
|
lt_date,
|
|
|
|
langDayOfMonth(date.date()),
|
|
|
|
lt_time,
|
|
|
|
date.time().toString(cTimeFormat()));
|
2015-12-21 13:14:29 +00:00
|
|
|
}
|
|
|
|
|
2017-04-13 08:45:58 +00:00
|
|
|
inline QString langDateTimeFull(const QDateTime &date) {
|
2019-06-19 16:39:25 +00:00
|
|
|
return tr::lng_mediaview_date_time(
|
|
|
|
tr::now,
|
|
|
|
lt_date,
|
|
|
|
langDayOfMonthFull(date.date()),
|
|
|
|
lt_time,
|
|
|
|
date.time().toString(cTimeFormat()));
|
2015-12-21 13:14:29 +00:00
|
|
|
}
|
|
|
|
|
2017-04-13 08:45:58 +00:00
|
|
|
bool langFirstNameGoesSecond();
|