0
I Use This!
Activity Not Available
Analyzed 11 months ago. based on code collected 11 months ago.

Project Summary

PrettyTime.NET is an OpenSource .NET time comparison library for creating human readable time. This is a modified version of PrettyTime, created by Lincoln Baxter, III from OcpSoft. PrettyTime can be found at http://code.google.com/p/prettytime/.

Completely customizable, PrettyTime.NET creates human readable, relative timestamps like those seen on Digg, Twitter, Gmail, Facebook and FeedWatchdog. It's simple, get started "right now!"

Simple Exampleprivate string PrettyItUp(DateTime Date)
{
using (PrettyTime.PrettyTime p = new PrettyTime.PrettyTime())
return p.format(Date);
}minutes from now test///
/// A test for minutes from now
///
[TestMethod()]
public void MinutesFromNow()
{
using (PrettyTime p = new PrettyTime())
{
Assert.AreEqual(“12 minutes from now”, p.format(DateTime.Now.AddMinutes(12)));
}
}days ago test///
/// A test for days ago
///
[TestMethod()]
public void DaysAgo()
{
using (PrettyTime p = new PrettyTime())
{
Assert.AreEqual(“3 days ago”, p.format(DateTime.Now.AddDays(-3)));
}
}

Tags

c datetime elapsed net pretty time timestamp

In a Nutshell, prettytimedotnet...

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    you can subscribe to e-mail newsletters to receive update from the Open Hub blog
  • ...
    nearly 1 in 3 companies have no process for identifying, tracking, or remediating known open source vulnerabilities
  • ...
    check out hot projects on the Open Hub

Languages

Languages?height=75&width=75
C#
92%
XML
8%

30 Day Summary

Apr 10 2016 — May 10 2016

12 Month Summary

May 10 2015 — May 10 2016

Ratings

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!