public static bool IsInvalidTimestamp()

in FixAntenna/NetCore/Message/FixTypes.cs [309:350]


		public static bool IsInvalidTimestamp(byte[] buffer, int offset, int count)
		{
			try
			{
				if (count != 17 && count != 21 && count != 24 && count != 27)
				{
					return true;
				}

				if (buffer[offset + 8] != (byte)'-' || buffer[offset + 11] != (byte)':' ||
					buffer[offset + 14] != (byte)':')
				{
					return true;
				}

				var year = ParseNumberPart(buffer, offset, offset + 4);
				if (year < 1583)
				{
					return true;
				}

				var month = ParseNumberPart(buffer, offset + 4, offset + 6) - 1;
				if (month < 0 || month > 11)
				{
					return true;
				}

				var date = ParseNumberPart(buffer, offset + 6, offset + 8);
				if (date < 1 || date > (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
					? LeapMonthLength[month]
					: MonthLength[month]))
				{
					return true;
				}

				return isInvalidTimeOnly(buffer, 9, buffer.Length - 9);
			}
			catch (Exception)
			{
				return true;
			}
		}