UKismetMathLibrary::Today
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns today's local date with the time component set to midnight (00:00:00). Equivalent to FDateTime::Today().
Caveats & Gotchas
- • The time component is always zero — do not expect it to reflect the current time. Use Now() if you need both date and time.
- • Like Now(), this uses local machine time. On networked multiplayer games, 'today' may differ between server and clients in different time zones, causing logic bugs if used for game-state decisions.
Signature
static UE_INL_API FDateTime Today( ); Return Type
FDateTime Example
Check if a saved date is today C++
FDateTime SavedDate = LoadSavedDate();
FDateTime Today = UKismetMathLibrary::Today();
if (SavedDate == Today)
{
// Player already played today
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?