// Version 1:
// Ausgruf: int TageFebruar = 28 + ist_Schaltjahr(1999);
int __fastcall ist_Schaltjahr(int jahr)
{
if (jahr % 4 == 0)
if (jahr < 1582) return 1;
else if (!(jahr % 100 == 0)) return 1;
else if (jahr % 400 == 0) return 1;
return 0;
}
// Version 2:
unsigned short GetDaysInMonth(unsigned short month, unsigned short year)
{
static unsigned short GauDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
return GauDays[month - 1] + ((month == 2) && IsLeapYear(year));
}
Kategorien
-
Neueste Beiträge
- [HANA] Übersicht über die Query-Ausführungs-Engine
- [ABAP] SAPscript: Texte editieren
- [ABAP] DMS: Dokumenteninfosatz zu Bestellung anlegen
- Kartoffelsalat – Variante 2
- [SAP] Aktivierung des Material Ledgers (ML)
- GraphQL-Implementierung in PHP
- [SAP] MM Kontenfindung
- [SAP] Automatische Buchungen: Konto-Modifikation (KOMOK)
- [SAP] Kontenpflege
- Epstein-Barr-Virus steht im Verdacht, Multiple Sklerose auszulösen