get_relative_datetime


Description:

public string get_relative_datetime (DateTime date_time)

Compares a GLib.DateTime to GLib.DateTime.now_local and returns a location, relative date and time string. Results appear as natural-language strings like "Now", "5m ago", "Yesterday"

Parameters:

date_time

a GLib.DateTime to compare against GLib.DateTime.now_local

Returns:

a localized, relative date and time string


Namespace: Granite.DateTime
Package: granite