Skip to content

ledsi/NTPClock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTPClock

Required libraries

  • NTPClient

getTime

	// getInstance
	NTPClock& ntpclock = NTPClock::getInstance();

	// Time without seconds
	ntpclock.getTime();

	// Time with seconds
	ntpclock.getTime("full");

	// Hour
	ntpclock.getTime("hour");

	// Minute
	ntpclock.getTime("minute");

	// Second
	ntpclock.getTime("second");

getDate

	// getInstance
	NTPClock& ntpclock = NTPClock::getInstance();

	// Full
	ntpclock.getDate();

	// Day
	ntpclock.getTime("day");

	// Month
	ntpclock.getTime("month");

	// Year
	ntpclock.getTime("year");

getWeekDay

Supported languages: de, en

	// getInstance
	NTPClock& ntpclock = NTPClock::getInstance();

	// Full
	ntpclock.getWeekday();

	// Full - different language
	ntpclock.getWeekday("full", "en");

	// Short
	ntpclock.getWeekday("short", "en");

	// Short - different language
	ntpclock.getWeekday("short", "en");

	// Number - Sun to Sat (0-6)
	ntpclock.getWeekday("number");

getMonth

Supported languages: de, en

	// getInstance
	NTPClock& ntpclock = NTPClock::getInstance();

	// Full
	ntpclock.getMonth();

	// Full - different language
	ntpclock.getMonth("full", "en");

	// Short
	ntpclock.getMonth("short", "en");

	// Short - different language
	ntpclock.getMonth("short", "en");

About

A clock with NTP time updates

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages