curDate()
Function Documentation for Merciglobal Cloud ERP¶
Overview¶
The curDate()
function is a built-in utility within Merciglobal Cloud ERP that returns the current system date in a consistent and standardized format.
Date Format¶
- Return Format:
YYYY-MM-DD
- Example Output:
2025-04-13
This format complies with the ISO 8601 standard, making it ideal for: - Database entries - API responses - Audit logs - User activity timestamps
Key Features¶
- 📦 Lightweight and efficient
- 🕒 Real-time current date
- 🌐 Timezone aware (based on server configuration)
- 🧩 Fully integrable with ERP workflows, forms, and business logic
Usage¶
const today = curDate();
console.log(today); // Outputs something like: 2025-04-13
Use Cases in Merciglobal Cloud ERP¶
- Automatically setting invoice dates
- Tagging creation or update timestamps on records
- Managing daily task or report generation
- Filtering entries by date in reports and dashboards
Best Practices¶
- Always use
curDate()
when dealing with dynamic date requirements in workflows. - Avoid hardcoding dates to ensure future-proof automation.
- Combine
curDate()
with time functions (likecurTime()
if available) for full timestamping.
Related Functions¶
curTime()
– Returns current time inHH:MM:SS
curDateTime()
– Returns full timestamp inYYYY-MM-DD HH:MM:SS
Merciglobal Cloud ERP – Powering precision and productivity. ⚙️