private static string SeasonsContinuousRangeLabel(List <Twelfth> twelfths, Twelfth rootTwelfth, Vector2 longLat) { Twelfth leftMostTwelfth = TwelfthUtility.GetLeftMostTwelfth(twelfths, rootTwelfth); Twelfth rightMostTwelfth = TwelfthUtility.GetRightMostTwelfth(twelfths, rootTwelfth); for (Twelfth twelfth = leftMostTwelfth; twelfth != rightMostTwelfth; twelfth = TwelfthUtility.TwelfthAfter(twelfth)) { if (!twelfths.Contains(twelfth)) { Log.Error(string.Concat(new object[] { "Twelfths doesn't contain ", twelfth, " (", leftMostTwelfth, "..", rightMostTwelfth, ")" }), false); break; } twelfths.Remove(twelfth); } twelfths.Remove(rightMostTwelfth); return(GenDate.SeasonDateStringAt(leftMostTwelfth, longLat) + " - " + GenDate.SeasonDateStringAt(rightMostTwelfth, longLat)); }
private static string SeasonsContinuousRangeLabel(List <Twelfth> twelfths, Twelfth rootTwelfth, Vector2 longLat) { Twelfth leftMostTwelfth = TwelfthUtility.GetLeftMostTwelfth(twelfths, rootTwelfth); Twelfth rightMostTwelfth = TwelfthUtility.GetRightMostTwelfth(twelfths, rootTwelfth); Twelfth twelfth = leftMostTwelfth; while (twelfth != rightMostTwelfth) { if (twelfths.Contains(twelfth)) { twelfths.Remove(twelfth); twelfth = TwelfthUtility.TwelfthAfter(twelfth); continue; } Log.Error("Twelfths doesn't contain " + twelfth + " (" + leftMostTwelfth + ".." + rightMostTwelfth + ")"); break; } twelfths.Remove(rightMostTwelfth); return(GenDate.SeasonDateStringAt(leftMostTwelfth, longLat) + " - " + GenDate.SeasonDateStringAt(rightMostTwelfth, longLat)); }
public static string SeasonDateStringAt(Twelfth twelfth, Vector2 longLat) { return(GenDate.SeasonDateStringAt((long)((int)twelfth * 300000 + 1), longLat)); }