Printing on Max7219 from Ds1302 time module

Hi guys;
I starting learn the way Max7219 works. this is my first attemp.

#include "LedControlMS.h"
#define NumMatrix 1  // Cuantas matrices vamos a usar
#include <DS1302.h>
// Inicializacion del modulo.
DS1302 rtc(2, 3, 5);
Time t;
LedControl lc=LedControl(12,11,10, NumMatrix);  

void setup()
   {
      for (int i=0; i< NumMatrix ; i++)
        {
           lc.shutdown(i,false);    
           lc.setIntensity(i,8);   
           lc.clearDisplay(i);   
        }
   }

void loop()
   {
    t = rtc.getTime();
        lc.writeString(0,t.date);
        delay(1000);
   }

well, as you noticed , through "if" instruction is possible print all values.

 if (t.date == 1) lc.writeString("1");
 if (t.hour == 1) lc.writeString("1");

However this way, is awkward and inefficient define all numbers an characters.

¿Is it possible to print any kind of variables ( serial. analog , digital read etc..) using ledControl Ms library?

¿Would you share an clue or example how I must solve this problem?

¿Is it possible to print any kind of variables ( serial. analog , digital read etc..) using ledControl Ms library?

You didn't provide a link to the library, so it is impossible to say for certain.

However, it seems obvious that the library provides a method to write strings, and C provides methods, such as itoa() and dtostrf() to convert integers and floats to strings. sprintf() provides a way to create a composite string, containing several ints, characters, strings, and literals.