Skip to content

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 (like curTime() if available) for full timestamping.
  • curTime() – Returns current time in HH:MM:SS
  • curDateTime() – Returns full timestamp in YYYY-MM-DD HH:MM:SS

Merciglobal Cloud ERP – Powering precision and productivity. ⚙️