Ago() public static method

public static Ago ( System.DateTime date ) : string
date System.DateTime
return string
Exemplo n.º 1
0
            private void ctlStatus_DataBind(object sender, EventArgs e)
            {
                // set the Text property of the Label to the TotalPostCount property
                var ctlStatus = (LiteralControl)sender;
                var container = (ListViewDataItem)ctlStatus.NamingContainer;
                var status    = ((TwitterStatus)container.DataItem);

                ctlStatus.Text = String.Format(
                    "<li>{0}<br /><span class=\"ajax__twitter_createat\">{1}</span></li>",
                    Twitter.ActivateLinks(status.Text),
                    Twitter.Ago(status.CreatedAt)
                    );
            }
Exemplo n.º 2
0
            private void ctlStatus_DataBind(object sender, EventArgs e)
            {
                // set the Text property of the Label to the TotalPostCount property
                var ctlStatus = (LiteralControl)sender;
                var container = (ListViewDataItem)ctlStatus.NamingContainer;
                var status    = ((TwitterStatus)container.DataItem);

                // Show status
                ctlStatus.Text = String.Format(
                    "<li><img src=\"{0}\" /><div>{1}<br /><span class=\"ajax__twitter_createat\">{2}</span></div></li>",
                    status.User.ProfileImageUrl,
                    status.Text,
                    Twitter.Ago(status.CreatedAt)
                    );
            }