getMonthNow static method

String getMonthNow()

Implementation

static String getMonthNow() {
  try {
    /// Intentar parsear la fecha usando DateTime.parse
    DateTime dateTime = DateTime.now();

    return '${dateTime.month}';
  } catch (error) {
    FlutterUtilsProvider.logDebug('Error al obtener el mes actual: $error');

    /// Si ocurre un error al parsear la fecha, devolver null
    return '';
  }
}