protected string delegate() getTimePeriod()
{
immutable string[] months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
string path = buildPath(this._config.path.officialDirectory, "test");
return delegate()
{
auto time = Clock.currTime();
return format("%s/%d/%s/savedData.log", path, time.year, months[time.month - 1], time.day);
};
}
My problem here, is the return type. Its a delegate. However, at the end of the function, I don't really understand what the delegate that is returned, points to.
I mean, format returns just a string, not an actual function. So the delegate points to...a string?