Skip to content

Commit

Permalink
Merge pull request #293 from MediaPortal/MP1-5210-Add_Short_DayOfWeek…
Browse files Browse the repository at this point in the history
…_and_Short_MonthOfYear_to_Date

MP1-5210: Add Short DayOfWeek and Short MonthOfYear to Date
  • Loading branch information
andrewjswan authored Mar 27, 2024
2 parents 1d21ba2 + daa69dc commit bdd822b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions mediaportal/MediaPortal.Application/MediaPortal.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region Copyright (C) 2005-2023 Team MediaPortal
#region Copyright (C) 2005-2024 Team MediaPortal

// Copyright (C) 2005-2023 Team MediaPortal
// Copyright (C) 2005-2024 Team MediaPortal
// http://www.team-mediaportal.com
//
// MediaPortal is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -6002,8 +6002,10 @@ protected string GetDate()

dateString = Utils.ReplaceTag(dateString, "<Day>", day, "unknown");
dateString = Utils.ReplaceTag(dateString, "<DD>", cur.Day.ToString(CultureInfo.InvariantCulture), "unknown");
dateString = Utils.ReplaceTag(dateString, "<DDD>", GetShortDayOfWeek(), "unknown");
dateString = Utils.ReplaceTag(dateString, "<Month>", month, "unknown");
dateString = Utils.ReplaceTag(dateString, "<MM>", cur.Month.ToString(CultureInfo.InvariantCulture), "unknown");
dateString = Utils.ReplaceTag(dateString, "<MMM>", GetShortMonthOfYear(), "unknown");
dateString = Utils.ReplaceTag(dateString, "<Year>", cur.Year.ToString(CultureInfo.InvariantCulture), "unknown");
dateString = Utils.ReplaceTag(dateString, "<YY>", (cur.Year - 2000).ToString("00"), "unknown");

Expand Down
8 changes: 6 additions & 2 deletions mediaportal/WindowPlugins/GUIHome/GUIHomeSetupForm.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region Copyright (C) 2005-2011 Team MediaPortal
#region Copyright (C) 2005-2024 Team MediaPortal

// Copyright (C) 2005-2011 Team MediaPortal
// Copyright (C) 2005-2024 Team MediaPortal
// http://www.team-mediaportal.com
//
// MediaPortal is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -186,6 +186,7 @@ private void UpdateTestBox()
day = "Sunday";
break;
}
string ddd = day.Substring(0, 3);

string month;
switch (cur.Month)
Expand Down Expand Up @@ -227,12 +228,15 @@ private void UpdateTestBox()
month = "December";
break;
}
string mmm = month.Substring(0, 3);

dateString = Util.Utils.ReplaceTag(dateString, "<Day>", day, "unknown");
dateString = Util.Utils.ReplaceTag(dateString, "<DD>", cur.Day.ToString(), "unknown");
dateString = Util.Utils.ReplaceTag(dateString, "<DDD>", ddd, "unknown");

dateString = Util.Utils.ReplaceTag(dateString, "<Month>", month, "unknown");
dateString = Util.Utils.ReplaceTag(dateString, "<MM>", cur.Month.ToString(), "unknown");
dateString = Util.Utils.ReplaceTag(dateString, "<MMM>", mmm, "unknown");

dateString = Util.Utils.ReplaceTag(dateString, "<Year>", cur.Year.ToString(), "unknown");
dateString = Util.Utils.ReplaceTag(dateString, "<YY>", (cur.Year - 2000).ToString("00"), "unknown");
Expand Down

0 comments on commit bdd822b

Please sign in to comment.